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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Wrapper type representing unlocked items.static interface
Interface type implemented by all wrapper objects in the cache.static class
Wrapper type representing locked items. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractReadWriteAccess
(DomainDataRegion domainDataRegion, DomainDataStorageAccess storageAccess) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
decrementLock
(SharedSessionContractImplementor session, Object key, AbstractReadWriteAccess.SoftLockImpl lock) get
(SharedSessionContractImplementor session, Object key) Returnsnull
if the item is not readable.protected abstract AccessedDataClassification
protected abstract Comparator
protected void
handleLockExpiry
(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 long
boolean
putFromLoad
(SharedSessionContractImplementor session, Object key, Object value, Object version) Attempt to cache an object, afterQuery loading from the database.final boolean
putFromLoad
(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 Lock
readLock()
void
remove
(SharedSessionContractImplementor session, Object key) Called afterQuery an item has become stale (beforeQuery the transaction completes).void
Remove all data for this accessed typevoid
unlockItem
(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 UUID
uuid()
protected Lock
Methods inherited from class org.hibernate.cache.spi.support.AbstractCachedDomainDataAccess
clearCache, contains, destroy, evict, evictAll, getRegion, getStorageAccess, lockRegion, unlockRegion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
-