public class LockManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LockManager.LockType |
Constructor and Description |
---|
LockManager() |
Modifier and Type | Method and Description |
---|---|
void |
acquireLock(String tableName,
long transNum,
LockManager.LockType lockType)
Acquires a lock on tableNum of type lockType for transaction transNum.
|
boolean |
holdsLock(String tableName,
long transNum,
LockManager.LockType lockType)
Returns a boolean indicating whether or not transNum holds a lock of type lockType on tableName.
|
void |
releaseLock(String tableName,
long transNum)
Releases transNum's lock on tableName.
|
public void acquireLock(String tableName, long transNum, LockManager.LockType lockType)
tableName
- the database to lock ontransNum
- the transactions idlockType
- the type of lockpublic void releaseLock(String tableName, long transNum)
tableName
- the table that was lockedtransNum
- the transaction that held the lockpublic boolean holdsLock(String tableName, long transNum, LockManager.LockType lockType)
tableName
- the table that we're checkingtransNum
- the transaction that we're checking forlockType
- the lock typeCopyright © 2017. All rights reserved.