public class BasicLocker extends Locker
defaultNoWait, deleteInfo, envImpl, handleLockToHandleMap, handleToHandleLockMap, id, lockManager, readUncommittedDefault, thread
Modifier | Constructor and Description |
---|---|
protected |
BasicLocker(EnvironmentImpl env)
Creates a BasicLocker.
|
protected |
BasicLocker(EnvironmentImpl env,
boolean noWait)
Creates a BasicLocker with a noWait argument.
|
protected |
BasicLocker(EnvironmentImpl env,
boolean noWait,
boolean noAPIReadLock)
Creates a BasicLocker with the noWait and noAPIReadLock arguments.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addLock(java.lang.Long nodeId,
LockType type,
LockGrantType grantStatus)
Add a lock to set owned by this transaction.
|
protected void |
checkState(boolean ignoreCalledByAbort) |
LockStats |
collectStats(LockStats stats)
stats
|
static BasicLocker |
createBasicLocker(EnvironmentImpl env) |
static BasicLocker |
createBasicLocker(EnvironmentImpl env,
boolean noWait) |
static BasicLocker |
createBasicLocker(EnvironmentImpl env,
boolean noWait,
boolean noAPIReadLock) |
boolean |
createdNode(long nodeId)
Always false for this txn.
|
protected long |
generateId(TxnManager txnManager,
long ignore)
BasicLockers always have a fixed id, because they are never used for
recovery.
|
long |
getAbortLsn(long nodeId) |
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()
Throws UnsupportedOperationException unconditionally.
|
void |
nonTxnOperationEnd()
Release locks and close the cursor at the end of the operation.
|
void |
operationEnd(boolean operationOK)
Release locks and close the cursor at the end of the operation.
|
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, initApiReadLock, isHandleLockTransferrable, isReadUncommittedDefault, isTimedOut, lock, nonBlockingLock, operationEnd, operationEnd, releaseLock, setLockTimeout, setOnlyAbortable, setTxnTimeout, sharesLocksWith, toString, transferHandleLock
protected BasicLocker(EnvironmentImpl env) throws DatabaseException
DatabaseException
protected BasicLocker(EnvironmentImpl env, boolean noWait) throws DatabaseException
DatabaseException
protected BasicLocker(EnvironmentImpl env, boolean noWait, boolean noAPIReadLock) throws DatabaseException
DatabaseException
public static BasicLocker createBasicLocker(EnvironmentImpl env) throws DatabaseException
DatabaseException
public static BasicLocker createBasicLocker(EnvironmentImpl env, boolean noWait) throws DatabaseException
DatabaseException
public static BasicLocker createBasicLocker(EnvironmentImpl env, boolean noWait, boolean noAPIReadLock) throws DatabaseException
DatabaseException
protected long generateId(TxnManager txnManager, long ignore)
generateId
in class Locker
protected void checkState(boolean ignoreCalledByAbort) throws DatabaseException
checkState
in class Locker
DatabaseException
public Locker getWriteOwnerLocker(long nodeId) throws DatabaseException
DatabaseException
public boolean isTransactional()
isTransactional
in class Locker
public boolean isSerializableIsolation()
isSerializableIsolation
in class Locker
public boolean isReadCommittedIsolation()
isReadCommittedIsolation
in class Locker
public Txn getTxnLocker()
getTxnLocker
in class Locker
public Locker newNonTxnLocker() throws DatabaseException
newNonTxnLocker
in class Locker
DatabaseException
public void releaseNonTxnLocks() throws DatabaseException
releaseNonTxnLocks
in class Locker
DatabaseException
public void nonTxnOperationEnd() throws DatabaseException
nonTxnOperationEnd
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 an auto Txn)DatabaseException
public void setHandleLockOwner(boolean operationOK, Database dbHandle, boolean dbIsClosing) throws DatabaseException
setHandleLockOwner
in class Locker
DatabaseException
public void registerCursor(CursorImpl cursor) throws DatabaseException
registerCursor
in class Locker
DatabaseException
public void unRegisterCursor(CursorImpl cursor) throws DatabaseException
unRegisterCursor
in class Locker
DatabaseException
public long getAbortLsn(long nodeId) throws DatabaseException
getAbortLsn
in class Locker
DatabaseException
public WriteLockInfo getWriteLockInfo(long nodeId) throws DatabaseException
getWriteLockInfo
in class Locker
DatabaseException
public void markDeleteAtTxnEnd(DatabaseImpl db, boolean deleteAtCommit) throws DatabaseException
Locker
markDeleteAtTxnEnd
in class Locker
DatabaseException
protected void addLock(java.lang.Long nodeId, LockType type, LockGrantType grantStatus) throws DatabaseException
addLock
in class Locker
DatabaseException
public boolean createdNode(long nodeId) throws DatabaseException
createdNode
in class Locker
DatabaseException
public LockStats collectStats(LockStats stats) throws DatabaseException
collectStats
in class Locker
DatabaseException