|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CommitLock
The CommitLock should never by acquired directly, but always through the CommitLockPolicy. The
implementation of the lock are not supposed to use techniques like spinning, that should all be part of the
lockpolicy. The lock implementation should try to acquire the lock and fail immediately if it can't.
| Method Summary | |
|---|---|
Transaction |
___getLockOwner()
Returns the current owner of the lock, or null if not locked. |
void |
___releaseLock(Transaction expectedLockOwner)
Releases the lock under the condition that it was owned by the expectedLockOwner. |
boolean |
___tryLock(Transaction lockOwner)
Tries to acquire the lock. |
| Method Detail |
|---|
Transaction ___getLockOwner()
boolean ___tryLock(Transaction lockOwner)
lockOwner - the Transaction that wants to own the lock.
void ___releaseLock(Transaction expectedLockOwner)
expectedLockOwner - the expected Transaction that owns the lock.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||