org.hibernate.cache.jbc2.timestamp
Class TimestampsRegionImpl
java.lang.Object
org.hibernate.cache.jbc2.BasicRegionAdapter
org.hibernate.cache.jbc2.TransactionalDataRegionAdapter
org.hibernate.cache.jbc2.timestamp.TimestampsRegionImpl
- All Implemented Interfaces:
- GeneralDataRegion, Region, TimestampsRegion, TransactionalDataRegion
public class TimestampsRegionImpl
- extends TransactionalDataRegionAdapter
- implements TimestampsRegion
Defines the behavior of the timestamps cache region for JBossCache 2.x.
TODO Need to define a way to ensure asynchronous replication events
do not result in timestamps moving backward, while dealing with the fact
that the normal sequence of UpdateTimestampsCache.preinvalidate() then
UpdateTimestampsCache.invalidate() will result in 2 calls to put() with
the latter call having an earlier timestamp.
- Version:
- $Revision: 14368 $
- Author:
- Brian Stansberry
| Methods inherited from class org.hibernate.cache.jbc2.BasicRegionAdapter |
activateLocalClusterNode, deactivateLocalNode, ensureRegionRootExists, escapeRegionName, getCacheInstance, getElementCountInMemory, getElementCountOnDisk, getName, getNonLockingDataVersionOption, getRegionFqn, getSizeInMemory, getTimeout, getTypeFirstRegionFqn, getTypeLastRegionFqn, nextTimestamp, resume, suspend, suspendAndGet, toMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
TimestampsRegionImpl
public TimestampsRegionImpl(org.jboss.cache.Cache jbcCache,
String regionName,
String regionPrefix,
Properties properties)
- Create a new TimestampsRegionImpl.
- Parameters:
jbcCache - The JBC cache instance to use to store the timestamps dataregionName - The name of the region (within the JBC cache)regionPrefix - Any region prefix to applyproperties - The configuration properties.
createRegionFqn
protected org.jboss.cache.Fqn<String> createRegionFqn(String regionName,
String regionPrefix)
- Specified by:
createRegionFqn in class BasicRegionAdapter
evict
public void evict(Object key)
throws CacheException
- Specified by:
evict in interface GeneralDataRegion
- Throws:
CacheException
evictAll
public void evictAll()
throws CacheException
- Specified by:
evictAll in interface GeneralDataRegion
- Throws:
CacheException
get
public Object get(Object key)
throws CacheException
- Specified by:
get in interface GeneralDataRegion
- Throws:
CacheException
put
public void put(Object key,
Object value)
throws CacheException
- Specified by:
put in interface GeneralDataRegion
- Throws:
CacheException
destroy
public void destroy()
throws CacheException
- Specified by:
destroy in interface Region- Overrides:
destroy in class BasicRegionAdapter
- Throws:
CacheException
nodeModified
public void nodeModified(org.jboss.cache.notifications.event.NodeModifiedEvent event)
- Monitors cache events and updates the local cache
- Parameters:
event -
nodeRemoved
public void nodeRemoved(org.jboss.cache.notifications.event.NodeRemovedEvent event)
- Monitors cache events and updates the local cache
- Parameters:
event -
Copyright © 2008 Hibernate.org. All Rights Reserved.