org.ehcache.clustered.client.service
Interface ClusteringService

All Superinterfaces:
org.ehcache.spi.service.MaintainableService, org.ehcache.spi.persistence.PersistableResourceService, org.ehcache.spi.service.Service

public interface ClusteringService
extends org.ehcache.spi.persistence.PersistableResourceService

Provides support for accessing server-based resources.


Nested Class Summary
static interface ClusteringService.ClusteredCacheIdentifier
          A PersistenceSpaceIdentifier that can provide an id.
 
Nested classes/interfaces inherited from interface org.ehcache.spi.persistence.PersistableResourceService
org.ehcache.spi.persistence.PersistableResourceService.PersistenceSpaceIdentifier<T extends org.ehcache.spi.persistence.PersistableResourceService>
 
Method Summary
 ClusteringServiceConfiguration getConfiguration()
           
<K,V> org.ehcache.clustered.client.internal.store.ServerStoreProxy
getServerStoreProxy(ClusteringService.ClusteredCacheIdentifier cacheIdentifier, org.ehcache.core.spi.store.Store.Configuration<K,V> storeConfig, Consistency consistency)
          Gets a ServerStoreProxy though which a server-resident ServerStore is accessed.
 void releaseServerStoreProxy(org.ehcache.clustered.client.internal.store.ServerStoreProxy serverStoreProxy)
          Releases access to a ServerStoreProxy and the server-resident ServerStore it represents.
 
Methods inherited from interface org.ehcache.spi.persistence.PersistableResourceService
destroy, destroyAll, getPersistenceSpaceIdentifier, getStateRepositoryWithin, handlesResourceType, releasePersistenceSpaceIdentifier
 
Methods inherited from interface org.ehcache.spi.service.MaintainableService
startForMaintenance
 
Methods inherited from interface org.ehcache.spi.service.Service
start, stop
 

Method Detail

getConfiguration

ClusteringServiceConfiguration getConfiguration()

getServerStoreProxy

<K,V> org.ehcache.clustered.client.internal.store.ServerStoreProxy getServerStoreProxy(ClusteringService.ClusteredCacheIdentifier cacheIdentifier,
                                                                                       org.ehcache.core.spi.store.Store.Configuration<K,V> storeConfig,
                                                                                       Consistency consistency)
                                                                                 throws org.ehcache.CachePersistenceException
Gets a ServerStoreProxy though which a server-resident ServerStore is accessed.

Type Parameters:
K - the cache-exposed key type
V - the cache-exposed value type
Parameters:
cacheIdentifier - the ClusteredCacheIdentifier for the cache for which a ServerStoreProxy is requested
storeConfig - the configuration used for the Store for which the ServerStoreProxy is requested
consistency - the store's consistency
Returns:
a new ServerStoreProxy
Throws:
org.ehcache.CachePersistenceException - if the cacheIdentifier is unknown or the ServerStoreProxy cannot be created

releaseServerStoreProxy

void releaseServerStoreProxy(org.ehcache.clustered.client.internal.store.ServerStoreProxy serverStoreProxy)
Releases access to a ServerStoreProxy and the server-resident ServerStore it represents.

Parameters:
serverStoreProxy - a ServerStoreProxy obtained through getServerStoreProxy(org.ehcache.clustered.client.service.ClusteringService.ClusteredCacheIdentifier, org.ehcache.core.spi.store.Store.Configuration, org.ehcache.clustered.common.Consistency)