public class AbstractReadWriteAccessStrategy extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractReadWriteAccessStrategy.Item
Wrapper type representing unlocked items.
|
static class |
AbstractReadWriteAccessStrategy.Lock
Wrapper type representing locked items.
|
static interface |
AbstractReadWriteAccessStrategy.Lockable
Interface type implemented by all wrapper objects in the cache.
|
| Constructor and Description |
|---|
AbstractReadWriteAccessStrategy(org.hibernate.cfg.Settings settings,
org.hibernate.cache.spi.GeneralDataRegion region,
org.redisson.api.RMapCache<Object,Object> mapCache) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decrementLock(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
AbstractReadWriteAccessStrategy.Lock lock)
Unlock and re-put the given key, lock combination.
|
void |
evict(Object key) |
void |
evictAll() |
Object |
get(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
long txTimestamp) |
protected void |
handleLockExpiry(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
AbstractReadWriteAccessStrategy.Lockable lock)
Handle the timeout of a previous lock mapped to this key
|
org.hibernate.cache.spi.access.SoftLock |
lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object version) |
org.hibernate.cache.spi.access.SoftLock |
lockRegion() |
boolean |
putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
long txTimestamp,
Object version) |
boolean |
putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
long txTimestamp,
Object version,
boolean minimalPutOverride) |
void |
remove(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key) |
void |
removeAll() |
void |
unlockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
org.hibernate.cache.spi.access.SoftLock lock) |
void |
unlockRegion(org.hibernate.cache.spi.access.SoftLock lock) |
public Object get(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key, long txTimestamp) throws org.hibernate.cache.CacheException
org.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
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
org.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
org.hibernate.cache.CacheExceptionprotected void decrementLock(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
AbstractReadWriteAccessStrategy.Lock lock)
protected void handleLockExpiry(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
AbstractReadWriteAccessStrategy.Lockable lock)
public boolean putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
long txTimestamp,
Object version)
throws org.hibernate.cache.CacheException
putFromLoad in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic org.hibernate.cache.spi.access.SoftLock lockRegion()
throws org.hibernate.cache.CacheException
lockRegion in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic void unlockRegion(org.hibernate.cache.spi.access.SoftLock lock)
throws org.hibernate.cache.CacheException
unlockRegion in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic void remove(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key)
throws org.hibernate.cache.CacheException
remove in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic void removeAll()
throws org.hibernate.cache.CacheException
removeAll in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic void evict(Object key) throws org.hibernate.cache.CacheException
evict in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionpublic void evictAll()
throws org.hibernate.cache.CacheException
evictAll in interface org.hibernate.cache.spi.access.RegionAccessStrategyorg.hibernate.cache.CacheExceptionCopyright © 2014–2019 The Redisson Project. All rights reserved.