public static final class AbstractReadWriteAccess.Item extends Object implements Serializable, AbstractReadWriteAccess.Lockable
| Modifier and Type | Method and Description |
|---|---|
Object |
getValue()
Returns the enclosed value.
|
boolean |
isReadable(long txTimestamp)
Returns
true if the enclosed value can be read by a transaction started at the given time. |
boolean |
isUnlockable(SoftLock lock)
Returns
true if the given lock can be unlocked using the given SoftLock instance as a handle. |
boolean |
isWriteable(long txTimestamp,
Object newVersion,
Comparator versionComparator)
Returns
true if the enclosed value can be replaced with one of the given version by a
transaction started at the given time. |
AbstractReadWriteAccess.SoftLockImpl |
lock(long timeout,
UUID uuid,
long lockId)
Locks this entry, stamping it with the UUID and lockId given, with the lock timeout occurring at the specified
time.
|
String |
toString() |
public boolean isReadable(long txTimestamp)
AbstractReadWriteAccess.Lockabletrue if the enclosed value can be read by a transaction started at the given time.isReadable in interface AbstractReadWriteAccess.Lockablepublic boolean isWriteable(long txTimestamp,
Object newVersion,
Comparator versionComparator)
AbstractReadWriteAccess.Lockabletrue if the enclosed value can be replaced with one of the given version by a
transaction started at the given time.isWriteable in interface AbstractReadWriteAccess.Lockablepublic Object getValue()
AbstractReadWriteAccess.LockablegetValue in interface AbstractReadWriteAccess.Lockablepublic boolean isUnlockable(SoftLock lock)
AbstractReadWriteAccess.Lockabletrue if the given lock can be unlocked using the given SoftLock instance as a handle.isUnlockable in interface AbstractReadWriteAccess.Lockablepublic AbstractReadWriteAccess.SoftLockImpl lock(long timeout, UUID uuid, long lockId)
AbstractReadWriteAccess.Lockablelock in interface AbstractReadWriteAccess.LockableCopyright © 2001-2022 Red Hat, Inc. All Rights Reserved.