Package org.hibernate.cache.spi.support
Class AbstractReadWriteAccess
java.lang.Object
org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess
org.hibernate.cache.spi.support.AbstractReadWriteAccess
- All Implemented Interfaces:
CachedDomainDataAccess,AbstractDomainDataRegion.Destructible
- Direct Known Subclasses:
CollectionReadWriteAccess,EntityReadWriteAccess,NaturalIdReadWriteAccess
- Author:
- Steve Ebersole
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classWrapper type representing unlocked items.static interfaceInterface type implemented by all wrapper objects in the cache.static classWrapper type representing locked items. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractReadWriteAccess(DomainDataRegion domainDataRegion, DomainDataStorageAccess storageAccess) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddecrementLock(SharedSessionContractImplementor session, Object key, AbstractReadWriteAccess.SoftLockImpl lock) get(SharedSessionContractImplementor session, Object key) Returnsnullif the item is not readable.protected abstract AccessedDataClassificationprotected abstract Comparatorprotected voidhandleLockExpiry(SharedSessionContractImplementor session, Object key, AbstractReadWriteAccess.Lockable lock) lockItem(SharedSessionContractImplementor session, Object key, Object version) We are going to attempt to update/delete the keyed object.protected longbooleanputFromLoad(SharedSessionContractImplementor session, Object key, Object value, Object version) Attempt to cache an object, afterQuery loading from the database.final booleanputFromLoad(SharedSessionContractImplementor session, Object key, Object value, Object version, boolean minimalPutOverride) Attempt to cache an object, afterQuery loading from the database, explicitly specifying the minimalPut behavior.protected LockreadLock()voidremove(SharedSessionContractImplementor session, Object key) Called afterQuery an item has become stale (beforeQuery the transaction completes).voidRemove all data for this accessed typevoidunlockItem(SharedSessionContractImplementor session, Object key, SoftLock lock) Called when we have finished the attempted update/delete (which may or may not have been successful), after transaction completion.protected UUIDuuid()protected LockMethods inherited from class org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess
clearCache, contains, destroy, evict, evictAll, getRegion, getStorageAccess, lockRegion, unlockRegionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.cache.spi.access.CachedDomainDataAccess
getAccessType
-
Constructor Details
-
AbstractReadWriteAccess
protected AbstractReadWriteAccess(DomainDataRegion domainDataRegion, DomainDataStorageAccess storageAccess)
-
-
Method Details
-
getVersionComparator
-
uuid
-
nextLockId
protected long nextLockId() -
readLock
-
writeLock
-
getAccessedDataClassification
-