类 AbstractReadWriteAccess.SoftLockImpl
- java.lang.Object
-
- org.hibernate.cache.spi.support.AbstractReadWriteAccess.SoftLockImpl
-
- 所有已实现的接口:
Serializable,SoftLock,AbstractReadWriteAccess.Lockable
public static class AbstractReadWriteAccess.SoftLockImpl extends Object implements Serializable, AbstractReadWriteAccess.Lockable, SoftLock
Wrapper type representing locked items.- 另请参阅:
- 序列化表格
-
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(Object o)ObjectgetValue()Returns the enclosed value.inthashCode()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.AbstractReadWriteAccess.SoftLockImpllock(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.StringtoString()voidunlock(long timestamp)Unlocks this Lock, and timestamps the unlock event.booleanwasLockedConcurrently()Returns true if this Lock has been concurrently locked by more than one transaction.
-
-
-
方法详细资料
-
isReadable
public boolean isReadable(long txTimestamp)
从接口复制的说明:AbstractReadWriteAccess.LockableReturnstrueif the enclosed value can be read by a transaction started at the given time.- 指定者:
isReadable在接口中AbstractReadWriteAccess.Lockable
-
isWriteable
public boolean isWriteable(long txTimestamp, Object newVersion, Comparator versionComparator)从接口复制的说明:AbstractReadWriteAccess.LockableReturnstrueif the enclosed value can be replaced with one of the given version by a transaction started at the given time.- 指定者:
isWriteable在接口中AbstractReadWriteAccess.Lockable
-
getValue
public Object getValue()
从接口复制的说明:AbstractReadWriteAccess.LockableReturns the enclosed value.- 指定者:
getValue在接口中AbstractReadWriteAccess.Lockable
-
isUnlockable
public boolean isUnlockable(SoftLock lock)
从接口复制的说明:AbstractReadWriteAccess.LockableReturnstrueif the given lock can be unlocked using the given SoftLock instance as a handle.- 指定者:
isUnlockable在接口中AbstractReadWriteAccess.Lockable
-
wasLockedConcurrently
public boolean wasLockedConcurrently()
Returns true if this Lock has been concurrently locked by more than one transaction.
-
lock
public AbstractReadWriteAccess.SoftLockImpl lock(long timeout, UUID uuid, long lockId)
从接口复制的说明: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.- 指定者:
lock在接口中AbstractReadWriteAccess.Lockable
-
unlock
public void unlock(long timestamp)
Unlocks this Lock, and timestamps the unlock event.
-
-