public class ReadWriteEntityRegionAccessStrategy extends Object implements org.hibernate.cache.spi.access.EntityRegionAccessStrategy
| Modifier and Type | Class and Description |
|---|---|
protected static class |
org.hibernate.cache.jcache.access.AbstractReadWriteRegionAccessStrategy.Item
Wrapper type representing unlocked items.
|
static class |
org.hibernate.cache.jcache.access.AbstractReadWriteRegionAccessStrategy.Lock
Wrapper type representing locked items.
|
protected static interface |
org.hibernate.cache.jcache.access.AbstractReadWriteRegionAccessStrategy.Lockable
Interface type implemented by all wrapper objects in the cache.
|
| Modifier and Type | Field and Description |
|---|---|
protected R |
region |
protected Comparator |
versionComparator |
| Constructor and Description |
|---|
ReadWriteEntityRegionAccessStrategy(JCacheEntityRegion region) |
| 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) |
void |
evict(Object key) |
void |
evictAll() |
Object |
generateCacheKey(Object id,
org.hibernate.persister.entity.EntityPersister persister,
org.hibernate.engine.spi.SessionFactoryImplementor factory,
String tenantIdentifier) |
Object |
get(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
long txTimestamp) |
Object |
getCacheKeyId(Object cacheKey) |
R |
getRegion() |
protected void |
handleMissingLock(Object key,
org.hibernate.cache.jcache.access.AbstractReadWriteRegionAccessStrategy.Lockable lock) |
boolean |
insert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object version) |
org.hibernate.cache.spi.access.SoftLock |
lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object version) |
org.hibernate.cache.spi.access.SoftLock |
lockRegion() |
protected long |
nextItemId() |
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) |
boolean |
update(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object currentVersion,
Object previousVersion) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected final R extends JCacheTransactionalDataRegion region
protected final Comparator versionComparator
public ReadWriteEntityRegionAccessStrategy(JCacheEntityRegion region)
public boolean insert(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object version)
throws org.hibernate.cache.CacheException
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
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
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
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.EntityRegionAccessStrategypublic Object getCacheKeyId(Object cacheKey)
getCacheKeyId in interface org.hibernate.cache.spi.access.EntityRegionAccessStrategypublic R getRegion()
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)
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.CacheExceptionpublic void remove(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key)
throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic void removeAll()
throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic void evict(Object key) throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic void evictAll()
throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic org.hibernate.cache.spi.access.SoftLock lockRegion()
throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionpublic void unlockRegion(org.hibernate.cache.spi.access.SoftLock lock)
throws org.hibernate.cache.CacheException
org.hibernate.cache.CacheExceptionprotected long nextItemId()
protected void handleMissingLock(Object key, org.hibernate.cache.jcache.access.AbstractReadWriteRegionAccessStrategy.Lockable lock)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.