public class EntityRegionImpl extends Object implements EntityRegion
| Modifier | Constructor and Description |
|---|---|
protected |
EntityRegionImpl(CachingRegionFactory cachingRegionFactory,
String name,
CacheDataDescription metadata,
SessionFactoryOptions settings) |
| Modifier and Type | Method and Description |
|---|---|
EntityRegionAccessStrategy |
buildAccessStrategy(AccessType accessType)
Build an access strategy for the requested access type.
|
boolean |
contains(Object key)
Determine whether this region contains data for the given key.
|
void |
destroy()
The "end state" contract of the region's lifecycle.
|
void |
evict(Object key)
Evict an item from the cache immediately (without regard for transaction
isolation).
|
void |
evictAll()
Evict all contents of this particular cache region (without regard for transaction
isolation).
|
Object |
get(SessionImplementor session,
Object key)
Get an item from the cache.
|
CacheDataDescription |
getCacheDataDescription()
Get the description of the type of data to be stored here, which would have been given to the RegionFactory
when creating this region
|
long |
getElementCountInMemory()
The count of entries currently contained in the regions in-memory store.
|
long |
getElementCountOnDisk()
The count of entries currently contained in the regions disk store.
|
String |
getName()
Retrieve the name of this region.
|
CachingRegionFactory |
getRegionFactory() |
SessionFactoryOptions |
getSettings() |
long |
getSizeInMemory()
The number of bytes is this cache region currently consuming in memory.
|
int |
getTimeout()
Get a timeout value.
|
boolean |
isTransactionAware()
Is the underlying cache implementation aware of (and "participating in")
ongoing JTA transactions?
Regions which report that they are transaction-aware are considered
"synchronous", in that we assume we can immediately (i.e.
|
long |
nextTimestamp()
Get the next timestamp according to the underlying cache implementor.
|
void |
put(SessionImplementor session,
Object key,
Object value)
Put an item into the cache.
|
Map |
toMap()
Get the contents of this region as a map.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCacheDataDescription, isTransactionAwarecontains, destroy, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMapprotected final Map cache
protected EntityRegionImpl(CachingRegionFactory cachingRegionFactory, String name, CacheDataDescription metadata, SessionFactoryOptions settings)
public SessionFactoryOptions getSettings()
public EntityRegionAccessStrategy buildAccessStrategy(AccessType accessType) throws CacheException
EntityRegionbuildAccessStrategy in interface EntityRegionaccessType - The type of access strategy to build; never null.CacheException - Usually indicates mis-configuration.public CacheDataDescription getCacheDataDescription()
TransactionalDataRegiongetCacheDataDescription in interface TransactionalDataRegionpublic boolean isTransactionAware()
TransactionalDataRegionisTransactionAware in interface TransactionalDataRegionpublic Object get(SessionImplementor session, Object key) throws CacheException
GeneralDataRegionget in interface GeneralDataRegionkey - The key of the item to be retrieved.CacheException - Indicates a problem accessing the item or region.public void put(SessionImplementor session, Object key, Object value) throws CacheException
GeneralDataRegionput in interface GeneralDataRegionkey - The key under which to cache the item.value - The item to cache.CacheException - Indicates a problem accessing the region.public void evict(Object key) throws CacheException
GeneralDataRegionevict in interface GeneralDataRegionkey - The key of the item to removeCacheException - Indicates a problem accessing the item or region.public void evictAll()
throws CacheException
GeneralDataRegionevictAll in interface GeneralDataRegionCacheException - Indicates problem accessing the region.public boolean contains(Object key)
Regionpublic CachingRegionFactory getRegionFactory()
public String getName()
Regionpublic void destroy()
throws CacheException
RegionSessionFactory.close() to give
the region a chance to cleanup.destroy in interface RegionCacheException - Indicates problem shutting downpublic long getSizeInMemory()
RegiongetSizeInMemory in interface Regionpublic long getElementCountInMemory()
RegiongetElementCountInMemory in interface Regionpublic long getElementCountOnDisk()
RegiongetElementCountOnDisk in interface Regionpublic Map toMap()
Regionpublic long nextTimestamp()
RegionnextTimestamp in interface Regionpublic int getTimeout()
RegiongetTimeout in interface RegionCopyright © 2001-2017 Red Hat, Inc. All Rights Reserved.