public class NonStrictReadWriteMemcachedNaturalIdRegionAccessStrategy extends AbstractMemcachedAccessStrategy<MemcachedNaturalIdRegion> implements org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
region| Constructor and Description |
|---|
NonStrictReadWriteMemcachedNaturalIdRegionAccessStrategy(MemcachedNaturalIdRegion region,
org.hibernate.boot.spi.SessionFactoryOptions settings)
Create a non-strict read/write access strategy accessing the given NaturalId region.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterInsert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value) |
boolean |
afterUpdate(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
org.hibernate.cache.spi.access.SoftLock lock) |
Object |
generateCacheKey(Object[] naturalIdValues,
org.hibernate.persister.entity.EntityPersister persister,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
Object |
get(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
long txTimestamp) |
Object[] |
getNaturalIdValues(Object cacheKey) |
boolean |
insert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value) |
org.hibernate.cache.spi.access.SoftLock |
lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object version) |
boolean |
putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor 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.SharedSessionContractImplementor session,
Object key)
A no-op since this is an asynchronous cache access strategy.
|
void |
unlockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
org.hibernate.cache.spi.access.SoftLock lock) |
boolean |
update(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value) |
evict, evictAll, getRegion, lockRegion, putFromLoad, region, removeAll, settings, unlockRegionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic NonStrictReadWriteMemcachedNaturalIdRegionAccessStrategy(MemcachedNaturalIdRegion region, org.hibernate.boot.spi.SessionFactoryOptions settings)
public Object get(org.hibernate.engine.spi.SharedSessionContractImplementor 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.SharedSessionContractImplementor 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<MemcachedNaturalIdRegion>org.hibernate.cache.CacheExceptionpublic org.hibernate.cache.spi.access.SoftLock lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor 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.SharedSessionContractImplementor 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.SharedSessionContractImplementor session,
Object key,
Object value)
throws org.hibernate.cache.CacheException
Returns false since this is an asynchronous cache access strategy.
insert in interface org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean afterInsert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value)
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.NaturalIdRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean update(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value)
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.NaturalIdRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean afterUpdate(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
org.hibernate.cache.spi.access.SoftLock lock)
throws org.hibernate.cache.CacheException
afterUpdate in interface org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic void remove(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key)
throws org.hibernate.cache.CacheException
AbstractMemcachedAccessStrategyremove in interface org.hibernate.cache.spi.access.RegionAccessStrategyremove in class AbstractMemcachedAccessStrategy<MemcachedNaturalIdRegion>org.hibernate.cache.CacheExceptionpublic Object generateCacheKey(Object[] naturalIdValues, org.hibernate.persister.entity.EntityPersister persister, org.hibernate.engine.spi.SharedSessionContractImplementor session)
generateCacheKey in interface org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategyCopyright © 2017. All rights reserved.