|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SoftLock
A soft lock is used to lock elements in transactional stores
| 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 |
boolean |
tryLock(long ms)
Attempt to lock the soft lock |
void |
unfreeze()
Unfreeze the soft lock |
void |
unlock()
Unlock the soft lock. |
| Method Detail |
|---|
Object getKey()
Element getElement(TransactionID currentTransactionId,
SoftLockID softLockId)
currentTransactionId - the current transaction under which this call is executedsoftLockId - the soft lock ID
void lock()
boolean tryLock(long ms)
throws InterruptedException
ms - the time in milliseconds before this method gives up
InterruptedException - if the thread calling this method was interruptedvoid clearTryLock()
void unlock()
void freeze()
getElement(TransactionID, SoftLockID) method calls.
Freeze is used to mark the start of a commit / rollback phase
void unfreeze()
boolean isExpired()
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||