|
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.ExclusiveLock
This class implements an exclusive lock policy. Only one transaction can hold this lock at one time.
Field Summary | |
private int |
level
|
TransactionID |
locker
ID of the Transaction that holds this lock or null. |
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 | |
ExclusiveLock()
|
Method Summary | |
TransactionID |
getLocker()
|
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. |
void |
release(Transaction ta)
Release the previously aquired lock. |
void |
reset()
|
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, toString, wait, wait, wait |
Field Detail |
protected static final long serialVersionUID
protected static final byte subSerialVersionUID
private int level
public TransactionID locker
Constructor Detail |
public ExclusiveLock()
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 TransactionID getLocker()
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |