public abstract class AbstractReadWriteAccess extends AbstractCachedDomainDataAccess
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractReadWriteAccess.Item
Wrapper type representing unlocked items.
|
static interface |
AbstractReadWriteAccess.Lockable
Interface type implemented by all wrapper objects in the cache.
|
static class |
AbstractReadWriteAccess.SoftLockImpl
Wrapper type representing locked items.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReadWriteAccess(org.hibernate.cache.spi.support.DomainDataRegionImpl region) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decrementLock(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
AbstractReadWriteAccess.SoftLockImpl lock) |
Object |
get(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key)
Returns
null if the item is not readable. |
org.hibernate.cache.spi.access.AccessType |
getAccessType() |
protected abstract Comparator |
getVersionComparator() |
protected void |
handleLockExpiry(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
AbstractReadWriteAccess.Lockable lock) |
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 |
nextLockId() |
boolean |
putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object version,
boolean minimalPutOverride) |
protected Lock |
readLock() |
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) |
protected UUID |
uuid() |
protected Lock |
writeLock() |
addToCache, clearCache, contains, destroy, evict, evictAll, getData, getFromCache, getRegion, putFromLoad, remove, removeAll, removeFromCacheprotected AbstractReadWriteAccess(org.hibernate.cache.spi.support.DomainDataRegionImpl region)
public org.hibernate.cache.spi.access.AccessType getAccessType()
protected abstract Comparator getVersionComparator()
protected UUID uuid()
protected long nextLockId()
protected Lock readLock()
protected Lock writeLock()
public final Object get(org.hibernate.engine.spi.SharedSessionContractImplementor session, Object key)
null if the item is not readable. Locked items are not readable, nor are items created
afterQuery the start of this transaction.get in interface org.hibernate.cache.spi.access.CachedDomainDataAccessget in class AbstractCachedDomainDataAccesspublic final boolean putFromLoad(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object value,
Object version,
boolean minimalPutOverride)
putFromLoad in interface org.hibernate.cache.spi.access.CachedDomainDataAccessputFromLoad in class AbstractCachedDomainDataAccesspublic final org.hibernate.cache.spi.access.SoftLock lockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
Object version)
public final void unlockItem(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
org.hibernate.cache.spi.access.SoftLock lock)
public org.hibernate.cache.spi.access.SoftLock lockRegion()
public void unlockRegion(org.hibernate.cache.spi.access.SoftLock lock)
protected void decrementLock(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
AbstractReadWriteAccess.SoftLockImpl lock)
protected void handleLockExpiry(org.hibernate.engine.spi.SharedSessionContractImplementor session,
Object key,
AbstractReadWriteAccess.Lockable lock)
Copyright © 2001-2019 Red Hat, Inc. All Rights Reserved.