|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.cache.infinispan.impl.BaseRegion
public abstract class BaseRegion
Support for Infinispan Regions. Handles common "utility" methods for an underlying named
Cache. In other words, this implementation doesn't actually read or write data. Subclasses are
expected to provide core cache interaction appropriate to the semantics needed.
| Field Summary | |
|---|---|
protected AddressAdapter |
address
|
protected CacheAdapter |
cacheAdapter
|
protected Set<AddressAdapter> |
currentView
|
protected AtomicReference<org.hibernate.cache.infinispan.impl.BaseRegion.InvalidateState> |
invalidateState
|
protected Object |
invalidationMutex
|
protected boolean |
replication
|
protected TransactionManager |
transactionManager
|
| Constructor Summary | |
|---|---|
BaseRegion(CacheAdapter cacheAdapter,
String name,
TransactionManager transactionManager,
RegionFactory factory)
|
|
| Method Summary | |
|---|---|
boolean |
checkValid()
|
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 |
entryInvalidated(org.infinispan.notifications.cachelistener.event.CacheEntryInvalidatedEvent event)
|
void |
entryModified(org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent event)
|
protected Object |
get(Object key,
FlagAdapter opt,
boolean suppressTimeout)
Performs a Infinispan get(Fqn, Object) |
AddressAdapter |
getAddress()
|
CacheAdapter |
getCacheAdapter()
|
long |
getElementCountInMemory()
The count of entries currently contained in the regions in-memory store. |
long |
getElementCountOnDisk()
Not supported. |
String |
getName()
Retrieve the name of this region. |
Object |
getOwnerForPut()
|
long |
getSizeInMemory()
Not supported. |
int |
getTimeout()
|
protected boolean |
handleEvictAllInvalidation(org.infinispan.notifications.cachelistener.event.CacheEntryInvalidatedEvent event)
|
protected boolean |
handleEvictAllModification(org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent event)
|
long |
nextTimestamp()
|
void |
resume(Transaction tx)
Tell the TransactionManager to resume the given transaction |
void |
start()
|
Transaction |
suspend()
Tell the TransactionManager to suspend any ongoing transaction. |
Map |
toMap()
Get the contents of this region as a map. |
void |
viewChanged(org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final CacheAdapter cacheAdapter
protected final AddressAdapter address
protected final Set<AddressAdapter> currentView
protected final TransactionManager transactionManager
protected final boolean replication
protected final Object invalidationMutex
protected final AtomicReference<org.hibernate.cache.infinispan.impl.BaseRegion.InvalidateState> invalidateState
| Constructor Detail |
|---|
public BaseRegion(CacheAdapter cacheAdapter,
String name,
TransactionManager transactionManager,
RegionFactory factory)
| Method Detail |
|---|
public void start()
public String getName()
Region
getName in interface Regionpublic CacheAdapter getCacheAdapter()
public long getElementCountInMemory()
Region
getElementCountInMemory in interface Regionpublic long getElementCountOnDisk()
getElementCountOnDisk in interface Regionpublic long getSizeInMemory()
getSizeInMemory in interface Regionpublic int getTimeout()
getTimeout in interface Regionpublic long nextTimestamp()
nextTimestamp in interface Regionpublic Map toMap()
Region
toMap in interface Region
public void destroy()
throws CacheException
RegionSessionFactory.close() to give
the region a chance to cleanup.
destroy in interface RegionCacheException - Indicates problem shutting downpublic boolean contains(Object key)
Region
contains in interface Regionkey - The cache key
public AddressAdapter getAddress()
public boolean checkValid()
protected Object get(Object key,
FlagAdapter opt,
boolean suppressTimeout)
throws CacheException
get(Fqn, Object)
key - The key of the item to getopt - any option to add to the get invocation. May be nullsuppressTimeout - should any TimeoutException be suppressed?
CacheException - issue managing transaction or talking to cachepublic Object getOwnerForPut()
public Transaction suspend()
null if
there wasn't onepublic void resume(Transaction tx)
tx - the transaction to suspend. May be null.public void entryModified(org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent event)
protected boolean handleEvictAllModification(org.infinispan.notifications.cachelistener.event.CacheEntryModifiedEvent event)
public void entryInvalidated(org.infinispan.notifications.cachelistener.event.CacheEntryInvalidatedEvent event)
protected boolean handleEvictAllInvalidation(org.infinispan.notifications.cachelistener.event.CacheEntryInvalidatedEvent event)
public void viewChanged(org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent event)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||