Package org.hibernate.cache.spi.support
Interface AbstractReadWriteAccess.Lockable
- All Known Implementing Classes:
AbstractReadWriteAccess.Item
,AbstractReadWriteAccess.SoftLockImpl
- Enclosing class:
- AbstractReadWriteAccess
public static interface AbstractReadWriteAccess.Lockable
Interface type implemented by all wrapper objects in the cache.
-
Method Summary
Modifier and TypeMethodDescriptiongetValue()
Returns the enclosed value.boolean
isReadable
(long txTimestamp) Returnstrue
if the enclosed value can be read by a transaction started at the given time.boolean
isUnlockable
(SoftLock lock) Returnstrue
if the given lock can be unlocked using the given SoftLock instance as a handle.boolean
isWriteable
(long txTimestamp, Object version, Comparator versionComparator) Returnstrue
if the enclosed value can be replaced with one of the given version by a transaction started at the given time.Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occurring at the specified time.
-
Method Details
-
isReadable
boolean isReadable(long txTimestamp) Returnstrue
if the enclosed value can be read by a transaction started at the given time. -
isWriteable
Returnstrue
if the enclosed value can be replaced with one of the given version by a transaction started at the given time. -
getValue
Object getValue()Returns the enclosed value. -
isUnlockable
Returnstrue
if the given lock can be unlocked using the given SoftLock instance as a handle. -
lock
Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occurring at the specified time. The returned Lock object can be used to unlock the entry in the future.
-