|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.txn.Locker
com.sleepycat.je.txn.BasicLocker
A concrete Locker that simply tracks locks and releases them when operationEnd is called.
Field Summary |
Fields inherited from class com.sleepycat.je.txn.Locker |
defaultNoWait, deleteInfo, dirtyReadDefault, envImpl, handleLockToHandleMap, handleToHandleLockMap, id, lockManager, lockTimeOutMillis, thread |
Constructor Summary | |
BasicLocker(EnvironmentImpl env)
Creates a BasicLocker. |
Method Summary | |
(package private) void |
addLock(Long nodeId,
Lock lock,
LockType type,
LockGrantType grantStatus,
MemoryBudget mb)
Add a lock to set owned by this transaction. |
protected void |
checkState(boolean ignoreCalledByAbort)
|
LockStats |
collectStats(LockStats stats)
stats |
boolean |
createdNode(long nodeId)
Always false for this txn. |
protected long |
generateId(TxnManager txnManager)
BasicLockers always have a fixed id, because they are never used for recovery. |
boolean |
getAbortKnownDeleted(long nodeId)
|
long |
getAbortLsn(long nodeId)
|
long |
getOwnerAbortLsn(long nodeId)
Get the abort LSN for this node in the txn that owns the lock on this node. |
Locker |
getWriteOwnerLocker(long nodeId)
Get the txn that owns the lock on this node. |
boolean |
isSerializableIsolation()
Is not serializable isolation. |
boolean |
isTransactional()
Is not transactional. |
LockResult |
lock(long nodeId,
LockType lockType,
DatabaseImpl database)
Get a lock on the given nodeId, using the configured noWait and timeout. |
void |
markDeleteAtTxnEnd(DatabaseImpl db,
boolean deleteAtCommit,
MemoryBudget mb)
Database operations like remove and truncate leave behind residual DatabaseImpls that must be purged at transaction commit or abort. |
(package private) void |
moveWriteToReadLock(long nodeId,
Lock lock,
MemoryBudget mb)
A lock is being demoted. |
Locker |
newInstance()
Creates a new instance of this txn for the same environment. |
LockGrantType |
nonBlockingReadLock(long nodeId)
Get a non-blocking read lock on this nodeId and return LockGrantType.DENIED if it is not granted. |
void |
operationEnd()
Release locks at the end of the transaction. |
void |
operationEnd(boolean operationOK)
Release locks at the end of the transaction. |
void |
registerCursor(CursorImpl cursor)
This txn doesn't store cursors. |
(package private) void |
removeLock(long nodeId,
Lock lock)
Remove a lock from the set owned by this txn. |
void |
setHandleLockOwner(boolean operationOK,
Database dbHandle,
boolean dbIsClosing)
Transfer any MapLN locks to the db handle. |
void |
unRegisterCursor(CursorImpl cursor)
This txn doesn't store cursors. |
Methods inherited from class com.sleepycat.je.txn.Locker |
addDeleteInfo, addToHandleMaps, demoteLock, dumpLockTable, getId, getLockTimeout, getTxnStartMillis, getTxnTimeOut, getWaitingFor, isDirtyReadDefault, isHandleLockTransferrable, isTimedOut, operationEnd, releaseLock, rememberHandleWriteLock, setLockTimeout, setOnlyAbortable, setTxnTimeout, setWaitingFor, sharesLocksWith, toString, transferHandleLock, transferHandleLockToHandle, unregisterHandle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BasicLocker(EnvironmentImpl env) throws DatabaseException
Method Detail |
protected long generateId(TxnManager txnManager)
generateId
in class Locker
protected void checkState(boolean ignoreCalledByAbort) throws DatabaseException
checkState
in class Locker
DatabaseException
public LockResult lock(long nodeId, LockType lockType, DatabaseImpl database) throws DatabaseException
lock
in class Locker
DatabaseException
public LockGrantType nonBlockingReadLock(long nodeId) throws DatabaseException
DatabaseException
public Locker getWriteOwnerLocker(long nodeId) throws DatabaseException
DatabaseException
public long getOwnerAbortLsn(long nodeId) throws DatabaseException
DatabaseException
public boolean isTransactional()
isTransactional
in class Locker
public boolean isSerializableIsolation()
isSerializableIsolation
in class Locker
public Locker newInstance() throws DatabaseException
newInstance
in class Locker
DatabaseException
public void operationEnd() throws DatabaseException
operationEnd
in class Locker
DatabaseException
public void operationEnd(boolean operationOK) throws DatabaseException
operationEnd
in class Locker
operationOK
- is whether the operation succeeded, since
that may impact ending behavior. (i.e for AutoTxn)
DatabaseException
public void setHandleLockOwner(boolean operationOK, Database dbHandle, boolean dbIsClosing) throws DatabaseException
setHandleLockOwner
in class Locker
DatabaseException
public void registerCursor(CursorImpl cursor)
registerCursor
in class Locker
public void unRegisterCursor(CursorImpl cursor)
unRegisterCursor
in class Locker
public long getAbortLsn(long nodeId) throws DatabaseException
getAbortLsn
in class Locker
DatabaseException
public boolean getAbortKnownDeleted(long nodeId) throws DatabaseException
getAbortKnownDeleted
in class Locker
DatabaseException
public void markDeleteAtTxnEnd(DatabaseImpl db, boolean deleteAtCommit, MemoryBudget mb) throws DatabaseException
Locker
markDeleteAtTxnEnd
in class Locker
DatabaseException
void addLock(Long nodeId, Lock lock, LockType type, LockGrantType grantStatus, MemoryBudget mb) throws DatabaseException
addLock
in class Locker
DatabaseException
void removeLock(long nodeId, Lock lock) throws DatabaseException
removeLock
in class Locker
DatabaseException
public boolean createdNode(long nodeId)
createdNode
in class Locker
void moveWriteToReadLock(long nodeId, Lock lock, MemoryBudget mb)
moveWriteToReadLock
in class Locker
public LockStats collectStats(LockStats stats) throws DatabaseException
collectStats
in class Locker
DatabaseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |