public class ReadWriteMemcachedEntityRegionAccessStrategy extends AbstractReadWriteMemcachedAccessStrategy<MemcachedEntityRegion> implements org.hibernate.cache.spi.access.EntityRegionAccessStrategy
AbstractReadWriteMemcachedAccessStrategy.Item, AbstractReadWriteMemcachedAccessStrategy.Lock, AbstractReadWriteMemcachedAccessStrategy.Lockableregion| Constructor and Description |
|---|
ReadWriteMemcachedEntityRegionAccessStrategy(MemcachedEntityRegion region,
org.hibernate.boot.spi.SessionFactoryOptions settings) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
afterInsert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object version) |
boolean |
afterUpdate(org.hibernate.engine.spi.SharedSessionContractImplementor 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 |
getCacheKeyId(Object cacheKey) |
boolean |
insert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object version) |
boolean |
update(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion) |
decrementLock, get, handleLockExpiry, lockItem, putFromLoad, unlockItemevict, evictAll, getRegion, lockRegion, putFromLoad, region, remove, removeAll, settings, unlockRegionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic ReadWriteMemcachedEntityRegionAccessStrategy(MemcachedEntityRegion region, org.hibernate.boot.spi.SessionFactoryOptions settings)
public boolean insert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object version)
throws org.hibernate.cache.CacheException
A no-op 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.SharedSessionContractImplementor session,
Object key,
Object value,
Object version)
throws org.hibernate.cache.CacheException
Inserts will only succeed if there is no existing value mapped to this key.
afterInsert in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean update(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion)
throws org.hibernate.cache.CacheException
A no-op since this is an asynchronous cache access strategy.
update in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic boolean afterUpdate(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion,
org.hibernate.cache.spi.access.SoftLock lock)
throws org.hibernate.cache.CacheException
Updates will only succeed if this entry was locked by this transaction and exclusively this transaction for the duration of this transaction. It is important to also note that updates will fail if the soft-lock expired during the course of this transaction.
afterUpdate in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategyorg.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.