public class ReadWriteMemcachedNaturalIdRegionAccessStrategy extends AbstractReadWriteMemcachedAccessStrategy<MemcachedNaturalIdRegion> implements org.hibernate.cache.spi.access.NaturalIdRegionAccessStrategy
AbstractReadWriteMemcachedAccessStrategy.Item, AbstractReadWriteMemcachedAccessStrategy.Lock, AbstractReadWriteMemcachedAccessStrategy.Lockableregion| Constructor and Description |
|---|
ReadWriteMemcachedNaturalIdRegionAccessStrategy(MemcachedNaturalIdRegion region,
org.hibernate.boot.spi.SessionFactoryOptions settings,
org.hibernate.cache.spi.CacheDataDescription metadata) |
| 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[] |
getNaturalIdValues(Object cacheKey) |
boolean |
insert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value) |
boolean |
update(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value) |
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 ReadWriteMemcachedNaturalIdRegionAccessStrategy(MemcachedNaturalIdRegion region, org.hibernate.boot.spi.SessionFactoryOptions settings, org.hibernate.cache.spi.CacheDataDescription metadata)
public boolean insert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value)
throws org.hibernate.cache.CacheException
A no-op 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
Inserts will only succeed if there is no existing value mapped to this key.
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
A no-op since this is an asynchronous cache access 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
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.NaturalIdRegionAccessStrategyorg.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.