public class ReadonlyTxn extends Txn
ACCUMULATED_LIMIT, commitLsn, dbCleanupSet, firstLoggedLsn, lastLoggedLsn, openedDatabaseHandles, repContext, undoDatabasesafterWaiterHook, envImpl, id, lockManager, thread| Constructor and Description |
|---|
ReadonlyTxn(EnvironmentImpl envImpl,
TransactionConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
disallowReplicaWrite()
Unconditionally throws ReplicaWriteException because this locker was
created on a replica.
|
boolean |
isLocalWrite()
Returns true if writes may only be to non-replicated DBs using this
locker, or false if writes may only be to replicated DBs.
|
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, addDbCleanup, addLock, addLogInfo, addOpenedDatabase, checkIfFrozen, checkPreempted, checkState, cleanupDatabaseImpls, clearReadLocks, clearWriteLocks, close, collectStats, commit, commit, commit, createAutoTxn, createLocalAutoTxn, createLocalTxn, dumpLog, generateId, getCommitDurability, getCommitToken, getDbCleanupSet, getDefaultDurability, getDTVLSN, getEmbeddedLoggables, getEnvironmentImpl, getExplicitDurabilityConfigured, getExplicitSyncConfigured, getFirstActiveLsn, getImportunate, getLastFormatChange, getLastLsn, getLogSize, getLogSize, getPrepared, getReadLockIds, getReplicatorNodeId, getState, getTransaction, getTransactionId, getTriggerDbs, getTxnLocker, getUndoDatabases, getWriteLockIds, getWriteLockInfo, hasReplicationFormat, isAutoTxn, isClosed, isMasterTxn, isOnlyAbortable, isReadCommittedIsolation, isReadOnly, isReplicationFormatWorthwhile, isRolledBack, isSerializableIsolation, isSuspended, isTransactional, isValid, lockingRequired, logicalEquals, newNonTxnLocker, nonTxnOperationEnd, noteTriggerDb, operationEnd, postLogAbortHook, postLogCommitAbortHook, postLogCommitHook, preLogAbortHook, preLogCommitHook, prepare, propagatePostCommitException, readFromLog, registerCursor, registerImmediately, releaseNonTxnLocks, releaseWriteLocks, removeLock, setDbCleanupState, setImportunate, setOnlyAbortable, setPrepared, setRollback, setSuspended, setTransaction, undo, unRegisterCursor, updateLoggedForTxn, writeToLog, writeToLogaddDeleteInfo, allowReleaseLockAfterLsnChange, demoteLock, dumpLockTable, getDefaultNoWait, getEnvironment, getId, getInitialLockTimeout, getLockTimeout, getPreemptable, getTxnTimeout, isReadUncommittedDefault, isReplicated, isTimedOut, lock, lockAfterLsnChange, nonBlockingLock, openCursorHook, operationEnd, operationEnd, releaseLock, setClosingLocker, setDefaultNoWait, setLockTimeout, setPreemptable, setPreempted, setTxnTimeout, sharesLocksWith, toStringpublic ReadonlyTxn(EnvironmentImpl envImpl, TransactionConfig config) throws DatabaseException
DatabaseExceptionpublic boolean isLocalWrite()
LockerisLocalWrite in class Lockerpublic LockResult lockInternal(long lsn, LockType lockType, boolean noWait, boolean jumpAheadOfWaiters, DatabaseImpl database) throws LockNotAvailableException, LockConflictException, DatabaseException
lockInternal in class Txnlsn - 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.LockNotAvailableExceptionDatabaseExceptionLocker.lockInternal(long, com.sleepycat.je.txn.LockType, boolean, boolean, com.sleepycat.je.dbi.DatabaseImpl)public void preLogWithoutLock(DatabaseImpl database)
preLogWithoutLock in class Txnpublic void disallowReplicaWrite()
disallowReplicaWrite in class Lockerprotected void txnBeginHook(TransactionConfig config) throws ReplicaConsistencyException, DatabaseException
txnBeginHook in class Txnconfig - the transaction config that applies to the txnDatabaseException - if there is a failureReplicaConsistencyExceptionCopyright © 2024. All rights reserved.