public class EhcacheTransactionalDataRegion extends EhcacheDataRegion implements TransactionalDataRegion
Modifier and Type | Field and Description |
---|---|
protected CacheDataDescription |
metadata
Metadata associated with the objects stored in the region.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all mapping from this cache region.
|
Object |
get(Object key)
Get the value mapped to this key, or null if no value is mapped to this key.
|
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
|
Settings |
getSettings()
Access the Hibernate settings associated with the persistence unit.
|
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.
|
boolean |
locksAreIndependentOfCache()
Returns
true if the locks used by the locking methods of this region are the independent of the cache. |
void |
put(Object key,
Object value)
Map the given value to the given key, replacing any existing mapping for this key
|
void |
readLock(Object key)
Attempts to read lock the mapping for the given key.
|
void |
readUnlock(Object key)
Attempts to read unlock the mapping for the given key.
|
void |
remove(Object key)
Remove the mapping for this key (if any exists).
|
void |
writeLock(Object key)
Attempts to write lock the mapping for the given key.
|
void |
writeUnlock(Object key)
Attempts to write unlock the mapping for the given key.
|
contains, destroy, getAccessStrategyFactory, getCache, getEhcache, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, destroy, getElementCountInMemory, getElementCountOnDisk, getName, getSizeInMemory, getTimeout, nextTimestamp, toMap
protected final CacheDataDescription metadata
public Settings getSettings()
public boolean isTransactionAware()
TransactionalDataRegion
isTransactionAware
in interface TransactionalDataRegion
public CacheDataDescription getCacheDataDescription()
TransactionalDataRegion
getCacheDataDescription
in interface TransactionalDataRegion
public final Object get(Object key)
key
- The cache keypublic final void put(Object key, Object value) throws CacheException
key
- The cache keyvalue
- The data to cacheCacheException
- Indicates a problem accessing the cachepublic final void remove(Object key) throws CacheException
key
- The cache keyCacheException
- Indicates a problem accessing the cachepublic final void clear() throws CacheException
CacheException
- Indicates a problem accessing the cachepublic final void writeLock(Object key) throws CacheException
key
- The cache keyCacheException
- Indicates a problem accessing the cachepublic final void writeUnlock(Object key) throws CacheException
key
- The cache keyCacheException
- Indicates a problem accessing the cachepublic final void readLock(Object key) throws CacheException
key
- The cache keyCacheException
- Indicates a problem accessing the cachepublic final void readUnlock(Object key) throws CacheException
key
- The cache keyCacheException
- Indicates a problem accessing the cachepublic final boolean locksAreIndependentOfCache()
true
if the locks used by the locking methods of this region are the independent of the cache.
Independent locks are not locked by the cache when the cache is accessed directly. This means that for an independent lock
lock holds taken through a region method will not block direct access to the cache via other means.Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.