|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LM
Lock Manager interface
Nested Class Summary | |
---|---|
static class |
LM.DeadLockException
|
static class |
LM.LockType
|
Field Summary | |
---|---|
static long |
DEFAULT_DEADLOCK_TIMEOUT
A transaction is considered in deadlock if it waits for lock more than 10 seconds. |
Method Summary | |
---|---|
void |
lockForRead(Transaction context,
Lockable resource)
obtain a read lock for given resource |
void |
lockForWrite(Transaction context,
Lockable resource)
obtain a write lock for given resource |
void |
setDeadlockTimeout(long ms)
Set deadlock timeout in millisecond. |
void |
unlockAll(Transaction context)
unlock all locks held by the transaction |
Field Detail |
---|
static final long DEFAULT_DEADLOCK_TIMEOUT
setDeadlockTimeout(long)
,
Constant Field ValuesMethod Detail |
---|
void lockForRead(Transaction context, Lockable resource) throws LM.DeadLockException, InterruptedException
context
- transaction identifierresource
- lockable resource identifier
LM.DeadLockException
- deadlock detected by either timeout or explicit deadlock detection algorithm
InterruptedException
- thread has been interrupted by coordination threadvoid lockForWrite(Transaction context, Lockable resource) throws LM.DeadLockException, InterruptedException
context
- transaction identifierresource
- lockable resource identifier
LM.DeadLockException
- deadlock detected by either timeout or explicit deadlock detection algorithm
InterruptedException
- thread has been interrupted by coordination threadvoid unlockAll(Transaction context)
context
- transaction identifiervoid setDeadlockTimeout(long ms)
ms
- timeout value in millisecond
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |