gr.uoa.di.madgik.rr.bridge
Interface IRegistryProvider


public interface IRegistryProvider


Method Summary
 boolean isReadPolicySupported(RRContext.ReadPolicy policy)
          Determines if a read policy is supported by the registry provider
 boolean isWritePolicySupported(RRContext.WritePolicy policy)
          Determines if a write policy is supported by the registry provider
 void persist(Set<Class<?>> items)
          Stores all data items to the remote repository.
 void persistDirect(Class<?> item)
          Implemented by providers whose remote repository is not expressed through a Datastore type and must support RRContext.WritePolicy.WRITE_THROUGH and RRContext.WritePolicy.WRITE_LOCAL Stores all data item instances of a specific type residing on the local data store directly to the remote repository.
 void persistDirect(Class<?> item, String id)
          Implemented by providers whose remote repository is not expressed through a Datastore type and must support RRContext.WritePolicy.WRITE_THROUGH and RRContext.WritePolicy.WRITE_LOCAL Stores a specific data item instance residing on the local data store directly to the remote repository.
 void prefetchInMemoryItems()
          Prefetches all data items which are marked as in-memory from the local data store and keeps them in an InMemoryStore
 void readConfiguration(Properties config)
          Reads provider-specific configuration
 void retrieve(Set<Class<?>> items)
          Retrieves all data items from the remote repository.
 void retrieveDirect(Class<?> item)
          Implemented by providers whose remote repository is not expressed through a Datastore type and must support RRContext.ReadPolicy.READ_THROUGH and RRContext.ReadPolicy.READ_LOCAL Retrieves all data item instances of a specific type from the remote repository and stores it in the local data store.
 void retrieveDirect(Class<?> item, String id)
          Implemented by providers whose remote repository is not expressed through a Datastore type and must support RRContext.ReadPolicy.READ_THROUGH and RRContext.ReadPolicy.READ_LOCAL Retrieves a specific data item instance from the remote repository and stores it in the local data store.
 void setInMemoryTargets(Set<Class<?>> itemTypes)
          Used to specify which data item types are to be prefetched in main memory
 

Method Detail

readConfiguration

void readConfiguration(Properties config)
                       throws ResourceRegistryException
Reads provider-specific configuration

Parameters:
config - The configuration resource
Throws:
ResourceRegistryException

setInMemoryTargets

void setInMemoryTargets(Set<Class<?>> itemTypes)
                        throws ResourceRegistryException
Used to specify which data item types are to be prefetched in main memory

Parameters:
itemTypes - The set of item types to be kept in main memory
Throws:
ResourceRegistryException

isReadPolicySupported

boolean isReadPolicySupported(RRContext.ReadPolicy policy)
                              throws ResourceRegistryException
Determines if a read policy is supported by the registry provider

Parameters:
policy - The read policy to be checked for support
Returns:
true if the read policy is supported, false otherwise
Throws:
ResourceRegistryException

isWritePolicySupported

boolean isWritePolicySupported(RRContext.WritePolicy policy)
                               throws ResourceRegistryException
Determines if a write policy is supported by the registry provider

Parameters:
policy - The write policy to be checked for support
Returns:
true if the write policy is supported, false otherwise
Throws:
ResourceRegistryException

prefetchInMemoryItems

void prefetchInMemoryItems()
                           throws ResourceRegistryException
Prefetches all data items which are marked as in-memory from the local data store and keeps them in an InMemoryStore

Throws:
ResourceRegistryException

persist

void persist(Set<Class<?>> items)
             throws ResourceRegistryException
Stores all data items to the remote repository. Intended to be called on a periodic basis as a bridging iteration step, implementing RRContext.WritePolicy.WRITE_BEHIND

Parameters:
items - The set of items to be stored in the repository
Throws:
ResourceRegistryException

retrieve

void retrieve(Set<Class<?>> items)
              throws ResourceRegistryException
Retrieves all data items from the remote repository. Intended to be called on a periodic basis as a bridging iteration step, implementing RRContext.ReadPolicy.REFRESH_AHEAD

Parameters:
items - The set of items to be stored in the repository
Throws:
ResourceRegistryException

persistDirect

void persistDirect(Class<?> item,
                   String id)
                   throws ResourceRegistryException
Implemented by providers whose remote repository is not expressed through a Datastore type and must support RRContext.WritePolicy.WRITE_THROUGH and RRContext.WritePolicy.WRITE_LOCAL Stores a specific data item instance residing on the local data store directly to the remote repository.

Parameters:
item - The item type
id - The item instance id
Throws:
ResourceRegistryException

persistDirect

void persistDirect(Class<?> item)
                   throws ResourceRegistryException
Implemented by providers whose remote repository is not expressed through a Datastore type and must support RRContext.WritePolicy.WRITE_THROUGH and RRContext.WritePolicy.WRITE_LOCAL Stores all data item instances of a specific type residing on the local data store directly to the remote repository.

Parameters:
item - The item type
Throws:
ResourceRegistryException

retrieveDirect

void retrieveDirect(Class<?> item,
                    String id)
                    throws ResourceRegistryException
Implemented by providers whose remote repository is not expressed through a Datastore type and must support RRContext.ReadPolicy.READ_THROUGH and RRContext.ReadPolicy.READ_LOCAL Retrieves a specific data item instance from the remote repository and stores it in the local data store.

Parameters:
item - The item type
id - The item instance id
Throws:
ResourceRegistryException

retrieveDirect

void retrieveDirect(Class<?> item)
                    throws ResourceRegistryException
Implemented by providers whose remote repository is not expressed through a Datastore type and must support RRContext.ReadPolicy.READ_THROUGH and RRContext.ReadPolicy.READ_LOCAL Retrieves all data item instances of a specific type from the remote repository and stores it in the local data store.

Parameters:
item - The item type
Throws:
ResourceRegistryException


Copyright © 2013. All Rights Reserved.