public abstract class AbstractCachedDomainDataAccess extends Object implements CachedDomainDataAccess, AbstractDomainDataRegion.Destructible
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCachedDomainDataAccess(DomainDataRegion region,
DomainDataStorageAccess storageAccess) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearCache() |
boolean |
contains(Object key)
Determine whether this region contains data for the given key.
|
void |
destroy() |
void |
evict(Object key)
Forcibly evict an item from the cache immediately without regard for transaction
isolation and/or locking.
|
void |
evictAll()
Forcibly evict all items from the cache immediately without regard for transaction
isolation.
|
Object |
get(SharedSessionContractImplementor session,
Object key)
Attempt to retrieve an object from the cache.
|
DomainDataRegion |
getRegion()
The region containing the data being accessed
|
protected DomainDataStorageAccess |
getStorageAccess() |
SoftLock |
lockRegion()
Lock the entire region
|
boolean |
putFromLoad(SharedSessionContractImplementor session,
Object key,
Object value,
Object version)
Attempt to cache an object, afterQuery loading from the database.
|
boolean |
putFromLoad(SharedSessionContractImplementor session,
Object key,
Object value,
Object version,
boolean minimalPutOverride)
Attempt to cache an object, afterQuery loading from the database, explicitly
specifying the minimalPut behavior.
|
void |
remove(SharedSessionContractImplementor session,
Object key)
Called afterQuery an item has become stale (beforeQuery the transaction completes).
|
void |
removeAll(SharedSessionContractImplementor session)
Remove all data for this accessed type
|
void |
unlockRegion(SoftLock lock)
Called after we have finished the attempted invalidation of the entire
region
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAccessType, lockItem, unlockItemprotected AbstractCachedDomainDataAccess(DomainDataRegion region, DomainDataStorageAccess storageAccess)
public DomainDataRegion getRegion()
CachedDomainDataAccessgetRegion in interface CachedDomainDataAccessprotected DomainDataStorageAccess getStorageAccess()
protected void clearCache()
public boolean contains(Object key)
CachedDomainDataAccesscontains in interface CachedDomainDataAccesskey - The cache keypublic Object get(SharedSessionContractImplementor session, Object key)
CachedDomainDataAccessget in interface CachedDomainDataAccesssession - Current session.key - The key of the item to be retrieved.nullpublic boolean putFromLoad(SharedSessionContractImplementor session, Object key, Object value, Object version)
CachedDomainDataAccessputFromLoad in interface CachedDomainDataAccesssession - Current session.key - The item keyvalue - The itemversion - the item version numbertrue if the object was successfully cachedpublic boolean putFromLoad(SharedSessionContractImplementor session, Object key, Object value, Object version, boolean minimalPutOverride)
CachedDomainDataAccessputFromLoad in interface CachedDomainDataAccesssession - Current session.key - The item keyvalue - The itemversion - the item version numberminimalPutOverride - Explicit minimalPut flagtrue if the object was successfully cachedpublic SoftLock lockRegion()
CachedDomainDataAccesslockRegion in interface CachedDomainDataAccessnull.public void unlockRegion(SoftLock lock)
CachedDomainDataAccessunlockRegion in interface CachedDomainDataAccesslock - The lock previously obtained from CachedDomainDataAccess.lockRegion()public void remove(SharedSessionContractImplementor session, Object key)
CachedDomainDataAccessremove in interface CachedDomainDataAccesssession - Current session.key - The key of the item to removepublic void removeAll(SharedSessionContractImplementor session)
CachedDomainDataAccessremoveAll in interface CachedDomainDataAccesspublic void evict(Object key)
CachedDomainDataAccessCache.evict(Class, Object), as well as the
Hibernate extension Cache.evictEntityData(Class, Serializable)
and Cache.evictEntityData(String, Serializable)evict in interface CachedDomainDataAccesskey - The key of the item to removepublic void evictAll()
CachedDomainDataAccessCache.evictAll() as well as the Hibernate
extensions Cache.evictEntityData(Class),
Cache.evictEntityData(String) and
Cache.evictEntityData()evictAll in interface CachedDomainDataAccesspublic void destroy()
destroy in interface AbstractDomainDataRegion.DestructibleCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.