|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.ozoneDB.core.AbstractLock | +--org.ozoneDB.core.SharedLock
This class implements a non-exclusive lock policy. Multiple transactions may hold this lock.
Field Summary | |
private int |
level
|
DxSet |
lockers
All transactions that hold this lock. |
private int |
prevLevel
|
protected static long |
serialVersionUID
|
protected static byte |
subSerialVersionUID
|
Fields inherited from interface org.ozoneDB.core.Lock |
LEVEL_MAX, LEVEL_NONE, LEVEL_READ, LEVEL_UPGRADE, LEVEL_WRITE, NOT_ACQUIRED |
Constructor Summary | |
SharedLock()
|
Method Summary | |
boolean |
areMultipleLockersHoldingLocks()
|
boolean |
hasChanged()
|
boolean |
isAcquiredBy(Transaction ta)
|
int |
level(Transaction ta)
Returns the lock level for the specified transaction. |
DxCollection |
lockerIDs()
Return all transactions that currently hold this lock. |
int |
previousLevel()
|
void |
release(Transaction ta)
Release the previously aquired lock. |
void |
reset()
|
java.lang.String |
toString()
|
int |
tryAcquire(Transaction ta,
int newLevel)
Try to aquire this lock. |
Methods inherited from class org.ozoneDB.core.AbstractLock |
checkDeadlock |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final long serialVersionUID
protected static final byte subSerialVersionUID
private int level
private transient int prevLevel
public DxSet lockers
Constructor Detail |
public SharedLock()
Method Detail |
public void reset()
public int tryAcquire(Transaction ta, int newLevel)
Lock
public void release(Transaction ta)
Lock
public boolean isAcquiredBy(Transaction ta)
public DxCollection lockerIDs()
Lock
public int level(Transaction ta)
Lock
ta
- The transaction that has acquired the lock or null.
public int previousLevel()
public boolean areMultipleLockersHoldingLocks()
public boolean hasChanged()
public java.lang.String toString()
toString
in class java.lang.Object
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |