public class ReadonlyTxn extends Txn
ACCUMULATED_LIMIT, commitLsn, deletedDatabases, firstLoggedLsn, lastLoggedLsn, openedDatabaseHandles, repContext, undoDatabases
defaultNoWait, deleteInfo, envImpl, id, lockManager, readUncommittedDefault, thread
Constructor and Description |
---|
ReadonlyTxn(EnvironmentImpl envImpl,
TransactionConfig config) |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
checkConsistency(RepImpl repImpl,
ReplicaConsistencyPolicy policy)
Utility method used here and by ReplicaThreadLocker.
|
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)
Provides a wrapper to screen for write locks.
|
void |
preLogWithoutLock(DatabaseImpl database)
If logging occurs before locking, we must screen out write locks here.
|
protected void |
txnBeginHook(TransactionConfig config)
Verifies that consistency requirements are met before allowing the
transaction to proceed.
|
abort, abort, abort, addLock, addLogInfo, addOpenedDatabase, checkPreempted, checkState, cleanupDatabaseImpls, clearWriteLocks, close, collectStats, commit, commit, commit, createdNode, createLocalAutoTxn, createLocalTxn, dumpLog, generateId, getCommitDurability, getCommitToken, getDefaultDurability, getEnvironmentImpl, getExplicitDurabilityConfigured, getExplicitSyncConfigured, getFirstActiveLsn, getImportunate, getLastLsn, getLogSize, getPrepared, getReadLockIds, getReplicatorNodeId, getState, getTransaction, getTransactionId, getTriggerDbs, getTxnLocker, getWriteLockIds, getWriteLockInfo, isAutoTxn, isClosed, isOnlyAbortable, isReadCommittedIsolation, isRolledBack, isSerializableIsolation, isSuspended, isTransactional, isValid, lockingRequired, logicalEquals, markDeleteAtTxnEnd, newNonTxnLocker, nonTxnOperationEnd, noteTriggerDb, operationEnd, postLogAbortHook, postLogCommitAbortHook, postLogCommitHook, preLogAbortHook, preLogCommitHook, prepare, propagatePostCommitException, readFromLog, registerCursor, releaseNonTxnLocks, releaseWriteLocks, setDeletedDatabaseState, setImportunate, setOnlyAbortable, setPrepared, setRollback, setSuspended, setTransaction, undo, unRegisterCursor, updateLoggedForTxn, writeToLog
addDeleteInfo, allowReleaseLockAfterLsnChange, demoteLock, dumpLockTable, getDefaultNoWait, getEnvironment, getId, getInitialLockTimeout, getLockTimeout, getPreemptable, getTxnTimeout, isReadUncommittedDefault, isTimedOut, lock, lockAfterLsnChange, nonBlockingLock, openCursorHook, operationEnd, operationEnd, releaseLock, setClosingLocker, setLockTimeout, setPreemptable, setPreempted, setTxnTimeout, sharesLocksWith, toString
public ReadonlyTxn(EnvironmentImpl envImpl, TransactionConfig config) throws DatabaseException
DatabaseException
public LockResult lockInternal(long lsn, LockType lockType, boolean noWait, boolean jumpAheadOfWaiters, DatabaseImpl database) throws LockNotAvailableException, LockConflictException, DatabaseException
lockInternal
in class Txn
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.LockConflictException
- if a blocking lock could not be acquired.LockNotAvailableException
DatabaseException
Locker.lockInternal(long, com.sleepycat.je.txn.LockType, boolean, boolean, com.sleepycat.je.dbi.DatabaseImpl)
public void preLogWithoutLock(DatabaseImpl database)
preLogWithoutLock
in class Txn
public void disallowReplicaWrite()
disallowReplicaWrite
in class Locker
protected void txnBeginHook(TransactionConfig config) throws ReplicaConsistencyException, DatabaseException
txnBeginHook
in class Txn
config
- the transaction config that applies to the txnDatabaseException
- if there is a failureReplicaConsistencyException
static void checkConsistency(RepImpl repImpl, ReplicaConsistencyPolicy policy)
public boolean isReplicationDefined()
Locker
isReplicationDefined
in class Locker
Copyright (c) 2004-2012 Oracle. All rights reserved.