EK - the entity cache key typeAK - the association cache key typeISK - the identity source cache key typepublic abstract class LocalCacheManager<EK,AK,ISK> extends Object
Implementations need to make sure all needed caches are started before state transfer happens. This prevents this node to return undefined cache errors during replication when other nodes join this one.
Implementations must be thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static interface |
LocalCacheManager.KeyProcessor<EK>
Processes keys obtained from a cache.
|
| Modifier | Constructor and Description |
|---|---|
protected |
LocalCacheManager(net.sf.ehcache.CacheManager cacheManager) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
forEachTuple(LocalCacheManager.KeyProcessor<EK> processor,
EntityKeyMetadata... entityKeyMetadatas)
Determines the caches storing the entities of the given key families, fetches the keys of these families and
invokes the given processor for each key.
|
abstract Cache<AK> |
getAssociationCache(AssociationKeyMetadata keyMetadata) |
protected net.sf.ehcache.CacheManager |
getCacheManager() |
abstract Cache<EK> |
getEntityCache(EntityKeyMetadata keyMetadata) |
abstract Cache<ISK> |
getIdSourceCache(IdSourceKeyMetadata keyMetadata) |
void |
stop() |
protected LocalCacheManager(net.sf.ehcache.CacheManager cacheManager)
protected net.sf.ehcache.CacheManager getCacheManager()
public void stop()
public abstract Cache<EK> getEntityCache(EntityKeyMetadata keyMetadata)
public abstract Cache<AK> getAssociationCache(AssociationKeyMetadata keyMetadata)
public abstract Cache<ISK> getIdSourceCache(IdSourceKeyMetadata keyMetadata)
public abstract void forEachTuple(LocalCacheManager.KeyProcessor<EK> processor, EntityKeyMetadata... entityKeyMetadatas)
processor - the processor that will be invoked on the keys of the given familiesentityKeyMetadatas - the meta-data of the keys to processCopyright © 2010–2016 Hibernate. All rights reserved.