public static final class AbstractReadWriteAccessStrategy.Item extends Object implements Serializable, AbstractReadWriteAccessStrategy.Lockable
| Constructor and Description |
|---|
Item(Object value,
Object version,
long timestamp)
Creates an unlocked item wrapping the given value with a version and creation timestamp.
|
| 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(org.hibernate.cache.spi.access.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<Object> versionComparator)
Returns
true if the enclosed value can be replaced with one of the given version by a
transaction started at the given time. |
AbstractReadWriteAccessStrategy.Lock |
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.
|
public boolean isReadable(long txTimestamp)
AbstractReadWriteAccessStrategy.Lockabletrue if the enclosed value can be read by a transaction started at the given time.isReadable in interface AbstractReadWriteAccessStrategy.Lockablepublic boolean isWriteable(long txTimestamp,
Object newVersion,
Comparator<Object> versionComparator)
AbstractReadWriteAccessStrategy.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 AbstractReadWriteAccessStrategy.Lockablepublic Object getValue()
AbstractReadWriteAccessStrategy.LockablegetValue in interface AbstractReadWriteAccessStrategy.Lockablepublic boolean isUnlockable(org.hibernate.cache.spi.access.SoftLock lock)
AbstractReadWriteAccessStrategy.Lockabletrue if the given lock can be unlocked using the given SoftLock instance as a handle.isUnlockable in interface AbstractReadWriteAccessStrategy.Lockablepublic AbstractReadWriteAccessStrategy.Lock lock(long timeout, UUID uuid, long lockId)
AbstractReadWriteAccessStrategy.Lockablelock in interface AbstractReadWriteAccessStrategy.LockableCopyright © 2014–2019 The Redisson Project. All rights reserved.