public class ReplayTxn extends Txn
ACCUMULATED_LIMIT, commitLsn, dbCleanupSet, firstLoggedLsn, lastLoggedLsn, openedDatabaseHandles, repContext, undoDatabasesafterWaiterHook, envImpl, id, lockManager, thread| Constructor and Description |
|---|
ReplayTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long txnId,
Logger logger)
Used when creating ReplayTxns at recovery.
|
ReplayTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long txnId,
SimpleTxnMap<ReplayTxn> activeTxns,
Logger logger)
Used when creating ReplayTxns for Replay.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Abort this transaction.
|
long |
abort(boolean forceFlush)
Abort this transaction.
|
long |
abort(ReplicationContext clientRepContext,
int abortMasterNodeId,
long abortDTVLSN) |
void |
cleanup()
Invoked when a ReplayTxn is being abandoned on shutdown.
|
void |
close(boolean isCommit)
Close and unregister this txn.
|
long |
commit()
Call commit() with the default sync configuration property.
|
long |
commit(Durability.SyncPolicy syncPolicy,
ReplicationContext clientRepContext,
int commitMasterNodeId,
long commitDTVLSN)
Commits the txn being replayed.
|
long |
commit(Durability durability)
Commit this transaction; it involves the following logical steps:
1.
|
void |
copyDatabasesForConversion(Txn masterTxn) |
long |
elapsedTime()
Returns the elapsed time associated with this transaction.
|
protected long |
generateId(TxnManager txnManager,
long mandatedId)
Replay transactions always use the txn id that is included in its
replicated operation.
|
protected long |
getDTVLSN()
This method is overridden by replication txn subclasses and returns the
DTVLSN associated with the Txn.
|
long |
getEndTime()
Returns the time when this transaction was committed or aborted.
|
protected long |
getInitialLockTimeout()
Don't let the ReplayTxn have a timeout of 0.
|
boolean |
getRepGroupDbChange() |
protected int |
getReplicatorNodeId()
This method is overridden by HA txn subclasses and returns the node id
of the master node that committed or aborted the txn.
|
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.
|
void |
noteRepGroupDbChange() |
void |
registerWithActiveTxns(SimpleTxnMap<ReplayTxn> newActiveTxns) |
Collection<Long> |
rollback(long matchpointLsn)
Rollback all write operations that are logged with an LSN > the
matchpointLsn parameter.
|
void |
setLastAppliedVLSN(VLSN justApplied) |
void |
setRepContext(ReplicationContext repContext)
ReplicatedTxns set it when the txn commit
or abort arrives.
|
void |
stealLockFromMasterTxn(Long lsn)
Transfer a lock from another transaction to this one.
|
String |
toString()
This method is safe to call without synchronizing and this fact is
relied on by LockManager when creating exception messages.
|
protected boolean |
updateLoggedForTxn()
Always return true in order to ensure that the VLSN is logged.
|
abort, addDbCleanup, addLock, addLogInfo, addOpenedDatabase, checkIfFrozen, checkPreempted, checkState, cleanupDatabaseImpls, clearReadLocks, clearWriteLocks, collectStats, commit, createAutoTxn, createLocalAutoTxn, createLocalTxn, dumpLog, getCommitDurability, getCommitToken, getDbCleanupSet, getDefaultDurability, getEmbeddedLoggables, getEnvironmentImpl, getExplicitDurabilityConfigured, getExplicitSyncConfigured, getFirstActiveLsn, getImportunate, getLastFormatChange, getLastLsn, getLogSize, getLogSize, getPrepared, getReadLockIds, getState, getTransaction, getTransactionId, getTriggerDbs, getTxnLocker, getUndoDatabases, getWriteLockIds, getWriteLockInfo, hasReplicationFormat, isAutoTxn, isClosed, isMasterTxn, isOnlyAbortable, isReadCommittedIsolation, isReadOnly, isReplicationFormatWorthwhile, isRolledBack, isSerializableIsolation, isSuspended, isTransactional, isValid, lockingRequired, lockInternal, logicalEquals, newNonTxnLocker, nonTxnOperationEnd, noteTriggerDb, operationEnd, postLogAbortHook, postLogCommitAbortHook, postLogCommitHook, preLogAbortHook, preLogCommitHook, preLogWithoutLock, prepare, propagatePostCommitException, readFromLog, registerCursor, registerImmediately, releaseNonTxnLocks, releaseWriteLocks, removeLock, setDbCleanupState, setImportunate, setOnlyAbortable, setPrepared, setRollback, setSuspended, setTransaction, txnBeginHook, undo, unRegisterCursor, writeToLog, writeToLogaddDeleteInfo, allowReleaseLockAfterLsnChange, demoteLock, disallowReplicaWrite, dumpLockTable, getDefaultNoWait, getEnvironment, getId, getLockTimeout, getPreemptable, getTxnTimeout, isReadUncommittedDefault, isReplicated, isTimedOut, lock, lockAfterLsnChange, nonBlockingLock, openCursorHook, operationEnd, operationEnd, releaseLock, setClosingLocker, setDefaultNoWait, setLockTimeout, setPreemptable, setPreempted, setTxnTimeout, sharesLocksWithpublic ReplayTxn(EnvironmentImpl envImpl, TransactionConfig config, long txnId, SimpleTxnMap<ReplayTxn> activeTxns, Logger logger) throws DatabaseException
DatabaseExceptionpublic ReplayTxn(EnvironmentImpl envImpl, TransactionConfig config, long txnId, Logger logger) throws DatabaseException
DatabaseExceptionprotected long getInitialLockTimeout()
getInitialLockTimeout in class Lockerpublic boolean isLocalWrite()
LockerisLocalWrite in class Lockerpublic boolean getRepGroupDbChange()
public void noteRepGroupDbChange()
public void registerWithActiveTxns(SimpleTxnMap<ReplayTxn> newActiveTxns)
protected long generateId(TxnManager txnManager, long mandatedId)
generateId in class Txnprotected int getReplicatorNodeId()
TxngetReplicatorNodeId in class Txnpublic long commit(Durability.SyncPolicy syncPolicy, ReplicationContext clientRepContext, int commitMasterNodeId, long commitDTVLSN) throws DatabaseException
syncPolicy - to be used for the commit.clientRepContext - the replication context it encapsulates the VLSN
associated with the txn.commitDTVLSN - the dtvlsnDatabaseExceptionpublic long commit()
Txnpublic long commit(Durability durability)
Txnpublic void abort()
Txnpublic long abort(boolean forceFlush)
Txnprotected long getDTVLSN()
Txnpublic long abort(ReplicationContext clientRepContext, int abortMasterNodeId, long abortDTVLSN) throws DatabaseException
DatabaseExceptionprotected boolean updateLoggedForTxn()
updateLoggedForTxn in class Txnpublic void close(boolean isCommit)
throws DatabaseException
Txnclose in class TxnDatabaseExceptionpublic void cleanup()
throws DatabaseException
DatabaseExceptionpublic Collection<Long> rollback(long matchpointLsn) throws DatabaseException
DatabaseExceptionpublic long elapsedTime()
public long getEndTime()
public void setLastAppliedVLSN(VLSN justApplied)
public void setRepContext(ReplicationContext repContext)
public String toString()
Lockerpublic void copyDatabasesForConversion(Txn masterTxn)
public void stealLockFromMasterTxn(Long lsn)
Copyright © 2024. All rights reserved.