|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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. |
boolean |
equals(Object object)
|
void |
freeze()
Freeze the soft lock. |
Element |
getElement(TransactionID currentTransactionId)
Get the element the current transaction is supposed to see. |
Element |
getFrozenElement()
Get the Element with which this soft lock should be replaced by a commit, rollback or clean up |
Object |
getKey()
Get the key of the element this soft lock is guarding |
TransactionID |
getTransactionID()
Get the ID of the transaction under which this soft lock is operating |
int |
hashCode()
|
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. |
Element |
updateElement(Element newElement)
Change the Element at the key this soft lock is guarding |
boolean |
wasPinned()
Check if the key was pinned in the underlying store before its element was replaced by this soft lock |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public Object getKey()
getKey in interface SoftLockpublic Element getElement(TransactionID currentTransactionId)
getElement in interface SoftLockcurrentTransactionId - the current transaction under which this call is executed
public Element updateElement(Element newElement)
updateElement in interface SoftLocknewElement - the new Element
public TransactionID getTransactionID()
getTransactionID in interface SoftLockpublic boolean wasPinned()
wasPinned in interface SoftLockpublic void lock()
lock in interface SoftLock
public boolean tryLock(long ms)
throws InterruptedException
tryLock in interface SoftLockms - the time in milliseconds before this method gives up
InterruptedException - if the thread calling this method was interruptedpublic void clearTryLock()
clearTryLock in interface SoftLockpublic void unlock()
unlock in interface SoftLockpublic void freeze()
SoftLock.getElement(TransactionID) method calls.
Freeze is used to mark the start of a commit / rollback phase
freeze in interface SoftLockpublic Element getFrozenElement()
getFrozenElement in interface SoftLockpublic void unfreeze()
unfreeze in interface SoftLockpublic boolean isExpired()
isExpired in interface SoftLockpublic boolean equals(Object object)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||