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) Notify before an attempt to update or delete the keyed object.protected long
boolean
putFromLoad
(SharedSessionContractImplementor session, Object key, Object value, Object version) Attempt to cache an object, after loading it from the database.final boolean
putFromLoad
(SharedSessionContractImplementor session, Object key, Object value, Object version, boolean minimalPutOverride) Attempt to cache an object, after loading from the database, explicitly specifying theminimalPut
behavior.protected Lock
readLock()
void
remove
(SharedSessionContractImplementor session, Object key) Notify that an item has become stale, before completion of the transaction.void
Remove all data for this accessed type.void
unlockItem
(SharedSessionContractImplementor session, Object key, SoftLock lock) Notify that an attempt to update or delete the keyed object has completed, with or without success, 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
-