public class NonStrictReadWriteMemcachedEntityRegionAccessStrategy extends AbstractMemcachedAccessStrategy<MemcachedEntityRegion> implements org.hibernate.cache.spi.access.EntityRegionAccessStrategy
region| Constructor and Description |
|---|
NonStrictReadWriteMemcachedEntityRegionAccessStrategy(MemcachedEntityRegion region,
org.hibernate.boot.spi.SessionFactoryOptions settings)
Create a non-strict read/write access strategy accessing the given collection region.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterInsert(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
Object version) |
boolean |
afterUpdate(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion,
org.hibernate.cache.spi.access.SoftLock lock) |
Object |
generateCacheKey(Object id,
org.hibernate.persister.entity.EntityPersister persister,
org.hibernate.engine.spi.SessionFactoryImplementor factory,
String tenantIdentifier) |
Object |
get(org.hibernate.engine.spi.SessionImplementor session,
Object key,
long txTimestamp) |
Object |
getCacheKeyId(Object cacheKey) |
boolean |
insert(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
Object version) |
org.hibernate.cache.spi.access.SoftLock |
lockItem(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object version) |
boolean |
putFromLoad(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
long txTimestamp,
Object version,
boolean minimalPutOverride)
This method is a placeholder for method signatures supplied by interfaces pulled in further down the class
hierarchy.
|
void |
remove(org.hibernate.engine.spi.SessionImplementor session,
Object key)
A no-op since this is an asynchronous cache access strategy.
|
void |
unlockItem(org.hibernate.engine.spi.SessionImplementor session,
Object key,
org.hibernate.cache.spi.access.SoftLock lock) |
boolean |
update(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion) |
evict, evictAll, getRegion, lockRegion, putFromLoad, region, removeAll, settings, unlockRegionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic NonStrictReadWriteMemcachedEntityRegionAccessStrategy(MemcachedEntityRegion region, org.hibernate.boot.spi.SessionFactoryOptions settings)
region - The wrapped regionsettings - The Hibernate settingspublic Object get(org.hibernate.engine.spi.SessionImplementor session, Object key, long txTimestamp) throws org.hibernate.cache.CacheException
get in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean putFromLoad(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
long txTimestamp,
Object version,
boolean minimalPutOverride)
throws org.hibernate.cache.CacheException
AbstractMemcachedAccessStrategyputFromLoad in interface org.hibernate.cache.spi.access.RegionAccessStrategyputFromLoad in class AbstractMemcachedAccessStrategy<MemcachedEntityRegion>org.hibernate.cache.CacheExceptionpublic org.hibernate.cache.spi.access.SoftLock lockItem(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object version)
throws org.hibernate.cache.CacheException
Since this is a non-strict read/write strategy item locking is not used.
lockItem in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic void unlockItem(org.hibernate.engine.spi.SessionImplementor session,
Object key,
org.hibernate.cache.spi.access.SoftLock lock)
throws org.hibernate.cache.CacheException
Since this is a non-strict read/write strategy item locking is not used.
unlockItem in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean insert(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
Object version)
throws org.hibernate.cache.CacheException
Returns false since this is an asynchronous cache access strategy.
insert in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean afterInsert(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
Object version)
throws org.hibernate.cache.CacheException
Returns false since this is a non-strict read/write cache access strategy
afterInsert in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean update(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion)
throws org.hibernate.cache.CacheException
Removes the entry since this is a non-strict read/write cache strategy.
update in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean afterUpdate(org.hibernate.engine.spi.SessionImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion,
org.hibernate.cache.spi.access.SoftLock lock)
throws org.hibernate.cache.CacheException
afterUpdate in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic void remove(org.hibernate.engine.spi.SessionImplementor session,
Object key)
throws org.hibernate.cache.CacheException
AbstractMemcachedAccessStrategyremove in interface org.hibernate.cache.spi.access.RegionAccessStrategyremove in class AbstractMemcachedAccessStrategy<MemcachedEntityRegion>org.hibernate.cache.CacheExceptionpublic Object generateCacheKey(Object id, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SessionFactoryImplementor factory, String tenantIdentifier)
generateCacheKey in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategyCopyright © 2017. All rights reserved.