Package org.hibernate.cache.spi.support
Interface AbstractReadWriteAccess.Lockable
-
- All Known Implementing Classes:
AbstractReadWriteAccess.Item,AbstractReadWriteAccess.SoftLockImpl
- Enclosing class:
- AbstractReadWriteAccess
public static interface AbstractReadWriteAccess.LockableInterface type implemented by all wrapper objects in the cache.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectgetValue()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, java.lang.Object version, java.util.Comparator versionComparator)Returnstrueif the enclosed value can be replaced with one of the given version by a transaction started at the given time.AbstractReadWriteAccess.SoftLockImpllock(long timeout, java.util.UUID uuid, long lockId)Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occurring at the specified time.
-
-
-
Method Detail
-
isReadable
boolean isReadable(long txTimestamp)
Returnstrueif the enclosed value can be read by a transaction started at the given time.
-
isWriteable
boolean isWriteable(long txTimestamp, java.lang.Object version, java.util.Comparator versionComparator)Returnstrueif the enclosed value can be replaced with one of the given version by a transaction started at the given time.
-
getValue
java.lang.Object getValue()
Returns the enclosed value.
-
isUnlockable
boolean isUnlockable(SoftLock lock)
Returnstrueif the given lock can be unlocked using the given SoftLock instance as a handle.
-
lock
AbstractReadWriteAccess.SoftLockImpl lock(long timeout, java.util.UUID uuid, long lockId)
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.
-
-