|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.transaction.ReadCommittedSoftLockImpl
public class ReadCommittedSoftLockImpl
A SoftLock implementation with Read-Committed isolation level
Method Summary | |
---|---|
void |
clearTryLock()
Clear the state of the soft lock after a tryLock() call succeeded. |
void |
freeze()
Freeze the soft lock. |
Element |
getElement(TransactionID currentTransactionId,
SoftLockID softLockId)
Get the element the current transaction is supposed to see. |
Object |
getKey()
Get the key of the element this soft lock is guarding |
boolean |
isExpired()
Check if the soft lock expired, ie: that the thread which locked it died |
void |
lock()
Lock the soft lock |
String |
toString()
|
boolean |
tryLock(long ms)
Attempt to lock the soft lock |
void |
unfreeze()
Unfreeze the soft lock |
void |
unlock()
Unlock the soft lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Object getKey()
getKey
in interface SoftLock
public Element getElement(TransactionID currentTransactionId, SoftLockID softLockId)
getElement
in interface SoftLock
currentTransactionId
- the current transaction under which this call is executedsoftLockId
- the soft lock ID
public void lock()
lock
in interface SoftLock
public boolean tryLock(long ms) throws InterruptedException
tryLock
in interface SoftLock
ms
- the time in milliseconds before this method gives up
InterruptedException
- if the thread calling this method was interruptedpublic void clearTryLock()
clearTryLock
in interface SoftLock
public void unlock()
unlock
in interface SoftLock
public void freeze()
SoftLock.getElement(TransactionID, SoftLockID)
method calls.
Freeze is used to mark the start of a commit / rollback phase
freeze
in interface SoftLock
public void unfreeze()
unfreeze
in interface SoftLock
public boolean isExpired()
isExpired
in interface SoftLock
public String toString()
toString
in class Object
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |