public class ReplicaThreadLocker extends ThreadLocker
defaultNoWait, deleteInfo, envImpl, id, lockManager, readUncommittedDefault, thread
Constructor and Description |
---|
ReplicaThreadLocker(RepImpl repImpl) |
Modifier and Type | Method and Description |
---|---|
void |
disallowReplicaWrite()
Unconditionally throws ReplicaWriteException because this locker was
created on a replica.
|
boolean |
isReplicationDefined()
Used for debugging checks to ensure that replication-defined lockers are
used for accessing replicated databases.
|
LockResult |
lockInternal(long lsn,
LockType lockType,
boolean noWait,
boolean jumpAheadOfWaiters,
DatabaseImpl database)
This overridden method prevents writes on a replica.
|
void |
openCursorHook(DatabaseImpl dbImpl)
Verifies that consistency requirements are met before allowing the
cursor to be opened.
|
void |
preLogWithoutLock(DatabaseImpl database)
If logging occurs before locking, we must screen out write locks here.
|
checkPreempted, checkState, createThreadLocker, lockAfterLsnChange, newNonTxnLocker, sharesLocksWith
addLock, collectStats, createBasicLocker, createBasicLocker, createdNode, generateId, getTxnLocker, getWriteLockInfo, getWriteOwnerLocker, isReadCommittedIsolation, isSerializableIsolation, isTransactional, lockingRequired, markDeleteAtTxnEnd, nonTxnOperationEnd, operationEnd, registerCursor, releaseNonTxnLocks, unRegisterCursor
addDeleteInfo, addOpenedDatabase, allowReleaseLockAfterLsnChange, demoteLock, dumpLockTable, getDefaultNoWait, getEnvironment, getId, getImportunate, getInitialLockTimeout, getLockTimeout, getPreemptable, getTransaction, getTxnTimeout, isReadUncommittedDefault, isRolledBack, isTimedOut, isValid, lock, nonBlockingLock, operationEnd, operationEnd, releaseLock, setClosingLocker, setImportunate, setLockTimeout, setOnlyAbortable, setPreemptable, setPreempted, setTxnTimeout, toString
public ReplicaThreadLocker(RepImpl repImpl)
public LockResult lockInternal(long lsn, LockType lockType, boolean noWait, boolean jumpAheadOfWaiters, DatabaseImpl database)
lockInternal
in class BasicLocker
lsn
- is the node to lock.lockType
- is the type of lock to request.noWait
- is true to override the defaultNoWait setting. If true,
or if defaultNoWait is true, throws LockNotAvailableException if the
lock cannot be granted without waiting.jumpAheadOfWaiters
- grant the lock before other waiters, if any.database
- is the database containing lsn.public void preLogWithoutLock(DatabaseImpl database)
preLogWithoutLock
in class BasicLocker
public void disallowReplicaWrite()
disallowReplicaWrite
in class Locker
public void openCursorHook(DatabaseImpl dbImpl) throws ReplicaConsistencyException
openCursorHook
in class Locker
ReplicaConsistencyException
public boolean isReplicationDefined()
Locker
isReplicationDefined
in class Locker
Copyright (c) 2004-2012 Oracle. All rights reserved.