public static class AbstractReadWriteAccess.SoftLockImpl extends Object implements Serializable, AbstractReadWriteAccess.Lockable, SoftLock
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Object |
getValue()
Returns the enclosed value.
|
int |
hashCode() |
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 occuring at the specified
time.
|
String |
toString() |
void |
unlock(long timestamp)
Unlocks this Lock, and timestamps the unlock event.
|
boolean |
wasLockedConcurrently()
Returns true if this Lock has been concurrently locked by more than one transaction.
|
public boolean isReadable(long txTimestamp)
AbstractReadWriteAccess.Lockable
true
if the enclosed value can be read by a transaction started at the given time.isReadable
in interface AbstractReadWriteAccess.Lockable
public boolean isWriteable(long txTimestamp, Object newVersion, Comparator versionComparator)
AbstractReadWriteAccess.Lockable
true
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.Lockable
public Object getValue()
AbstractReadWriteAccess.Lockable
getValue
in interface AbstractReadWriteAccess.Lockable
public boolean isUnlockable(SoftLock lock)
AbstractReadWriteAccess.Lockable
true
if the given lock can be unlocked using the given SoftLock instance as a handle.isUnlockable
in interface AbstractReadWriteAccess.Lockable
public boolean wasLockedConcurrently()
public AbstractReadWriteAccess.SoftLockImpl lock(long timeout, UUID uuid, long lockId)
AbstractReadWriteAccess.Lockable
lock
in interface AbstractReadWriteAccess.Lockable
public void unlock(long timestamp)
Copyright © 2019 JBoss by Red Hat. All rights reserved.