public class BasicLocker extends Locker
defaultNoWait, deleteInfo, envImpl, handleLockToHandleMap, handleToHandleLockMap, id, lockManager, lockTimeOutMillis, readUncommittedDefault, thread| Constructor and Description |
|---|
BasicLocker(EnvironmentImpl env)
Creates a BasicLocker.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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.
|
Txn |
getTxnLocker()
No transactional locker is available.
|
WriteLockInfo |
getWriteLockInfo(long nodeId) |
Locker |
getWriteOwnerLocker(long nodeId)
Get the txn that owns the lock on this node.
|
boolean |
isReadCommittedIsolation()
Is never read-committed isolation.
|
boolean |
isSerializableIsolation()
Is never serializable isolation.
|
boolean |
isTransactional()
Is never transactional.
|
void |
markDeleteAtTxnEnd(DatabaseImpl db,
boolean deleteAtCommit)
Database operations like remove and truncate leave behind
residual DatabaseImpls that must be purged at transaction
commit or abort.
|
Locker |
newNonTxnLocker()
Creates a new instance of this txn for the same environment.
|
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.
|
void |
releaseNonTxnLocks()
Releases all locks, since all locks held by this locker are
non-transactional.
|
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.
|
addDeleteInfo, addToHandleMaps, demoteLock, dumpLockTable, getDefaultNoWait, getId, getLockTimeout, getTxnTimeOut, isHandleLockTransferrable, isReadUncommittedDefault, isTimedOut, lock, nonBlockingLock, operationEnd, releaseLock, setLockTimeout, setTxnTimeout, sharesLocksWith, toString, transferHandleLockpublic BasicLocker(EnvironmentImpl env) throws DatabaseException
DatabaseExceptionprotected long generateId(TxnManager txnManager)
generateId in class Lockerprotected void checkState(boolean ignoreCalledByAbort)
throws DatabaseException
checkState in class LockerDatabaseExceptionpublic Locker getWriteOwnerLocker(long nodeId) throws DatabaseException
DatabaseExceptionpublic long getOwnerAbortLsn(long nodeId)
throws DatabaseException
DatabaseExceptionpublic boolean isTransactional()
isTransactional in class Lockerpublic boolean isSerializableIsolation()
isSerializableIsolation in class Lockerpublic boolean isReadCommittedIsolation()
isReadCommittedIsolation in class Lockerpublic Txn getTxnLocker()
getTxnLocker in class Lockerpublic Locker newNonTxnLocker() throws DatabaseException
newNonTxnLocker in class LockerDatabaseExceptionpublic void releaseNonTxnLocks()
throws DatabaseException
releaseNonTxnLocks in class LockerDatabaseExceptionpublic void operationEnd()
throws DatabaseException
operationEnd in class LockerDatabaseExceptionpublic void operationEnd(boolean operationOK)
throws DatabaseException
operationEnd in class LockeroperationOK - is whether the operation succeeded, since
that may impact ending behavior. (i.e for AutoTxn)DatabaseExceptionpublic void setHandleLockOwner(boolean operationOK,
Database dbHandle,
boolean dbIsClosing)
throws DatabaseException
setHandleLockOwner in class LockerDatabaseExceptionpublic void registerCursor(CursorImpl cursor) throws DatabaseException
registerCursor in class LockerDatabaseExceptionpublic void unRegisterCursor(CursorImpl cursor) throws DatabaseException
unRegisterCursor in class LockerDatabaseExceptionpublic long getAbortLsn(long nodeId)
throws DatabaseException
getAbortLsn in class LockerDatabaseExceptionpublic WriteLockInfo getWriteLockInfo(long nodeId) throws DatabaseException
getWriteLockInfo in class LockerDatabaseExceptionpublic void markDeleteAtTxnEnd(DatabaseImpl db, boolean deleteAtCommit) throws DatabaseException
LockermarkDeleteAtTxnEnd in class LockerDatabaseExceptionpublic boolean createdNode(long nodeId)
throws DatabaseException
createdNode in class LockerDatabaseExceptionpublic LockStats collectStats(LockStats stats) throws DatabaseException
collectStats in class LockerDatabaseException