|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.cache.ReadWriteCache.Lock
public static final class ReadWriteCache.Lock
A soft lock which supports concurrent locking, timestamped with the time it was released
Constructor Summary | |
---|---|
ReadWriteCache.Lock(long timeout,
int id,
Object version)
|
Method Summary | |
---|---|
int |
getId()
|
long |
getUnlockTimestamp()
|
boolean |
isGettable(long txTimestamp)
locks are not returned to the client! |
boolean |
isLock()
Yes, this is a lock |
boolean |
isPuttable(long txTimestamp,
Object newVersion,
Comparator comparator)
Can the timestamped transaction re-cache this locked item now? |
ReadWriteCache.Lock |
lock(long timeout,
int id)
Increment the lock, setting the new lock timeout |
String |
toString()
|
void |
unlock(long currentTimestamp)
Decrement the lock, setting the unlock timestamp if now unlocked |
boolean |
wasLockedConcurrently()
Was this lock held concurrently by multiple transactions? |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReadWriteCache.Lock(long timeout, int id, Object version)
Method Detail |
---|
public long getUnlockTimestamp()
public ReadWriteCache.Lock lock(long timeout, int id)
lock
in interface ReadWriteCache.Lockable
public void unlock(long currentTimestamp)
currentTimestamp
- public boolean isPuttable(long txTimestamp, Object newVersion, Comparator comparator)
isPuttable
in interface ReadWriteCache.Lockable
public boolean wasLockedConcurrently()
public boolean isLock()
isLock
in interface ReadWriteCache.Lockable
public boolean isGettable(long txTimestamp)
isGettable
in interface ReadWriteCache.Lockable
public int getId()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |