Package org.hibernate.cache.spi.support
Class AbstractReadWriteAccess.Item
java.lang.Object
org.hibernate.cache.spi.support.AbstractReadWriteAccess.Item
- All Implemented Interfaces:
Serializable,AbstractReadWriteAccess.Lockable
- Enclosing class:
AbstractReadWriteAccess
public static final class AbstractReadWriteAccess.Item
extends Object
implements Serializable, AbstractReadWriteAccess.Lockable
Wrapper type representing unlocked items.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetValue()Returns the enclosed value.booleanisReadable(long txTimestamp) Returnstrueif the enclosed value can be read by a transaction started at the given time.booleanisUnlockable(SoftLock lock) Returnstrueif the given lock can be unlocked using the given SoftLock instance as a handle.booleanisWriteable(long txTimestamp, Object newVersion, Comparator versionComparator) Returnstrueif 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.toString()
-
Method Details
-
isReadable
public boolean isReadable(long txTimestamp) Description copied from interface:AbstractReadWriteAccess.LockableReturnstrueif the enclosed value can be read by a transaction started at the given time.- Specified by:
isReadablein interfaceAbstractReadWriteAccess.Lockable
-
isWriteable
Description copied from interface:AbstractReadWriteAccess.LockableReturnstrueif the enclosed value can be replaced with one of the given version by a transaction started at the given time.- Specified by:
isWriteablein interfaceAbstractReadWriteAccess.Lockable
-
getValue
Description copied from interface:AbstractReadWriteAccess.LockableReturns the enclosed value.- Specified by:
getValuein interfaceAbstractReadWriteAccess.Lockable
-
isUnlockable
Description copied from interface:AbstractReadWriteAccess.LockableReturnstrueif the given lock can be unlocked using the given SoftLock instance as a handle.- Specified by:
isUnlockablein interfaceAbstractReadWriteAccess.Lockable
-
lock
Description copied from interface:AbstractReadWriteAccess.LockableLocks 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.- Specified by:
lockin interfaceAbstractReadWriteAccess.Lockable
-
toString
-