|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sleepycat.je.txn.Locker
com.sleepycat.je.txn.Txn
com.sleepycat.je.rep.txn.ReplayTxn
public final class ReplayTxn
Used for replaying replicated operations at replica nodes.
| Field Summary |
|---|
| Fields inherited from class com.sleepycat.je.txn.Txn |
|---|
ACCUMULATED_LIMIT, commitLsn, deletedDatabases, firstLoggedLsn, lastLoggedLsn, repContext, undoDatabases |
| Fields inherited from class com.sleepycat.je.txn.Locker |
|---|
defaultNoWait, deleteInfo, envImpl, handleLockToHandleMap, handleToHandleLockMap, id, lockManager, readUncommittedDefault, thread |
| Constructor Summary | |
|---|---|
ReplayTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long txnId,
Logger logger)
Used when creating ReplayTxns at recovery. |
|
ReplayTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long txnId,
Map<Long,ReplayTxn> activeTxns,
Logger logger)
Used when creating ReplayTxns for Replay. |
|
| Method Summary | |
|---|---|
void |
abort()
Abort this transaction. |
long |
abort(boolean forceFlush)
Abort this transaction. |
long |
abort(ReplicationContext clientRepContext,
int abortMasterNodeId)
|
void |
cleanup()
Invoked when a ReplayTxn is being abandoned on shutdown. |
protected void |
close(boolean isCommit)
Unregister this txn. |
long |
commit()
Call commit() with the default sync configuration property. |
long |
commit(Durability.SyncPolicy syncPolicy,
ReplicationContext clientRepContext,
int commitMasterNodeId)
Commits the txn being replayed. |
long |
commit(Durability durability)
Commit this transaction; it involves the following logical steps: 1. |
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 |
getInitialLockTimeout()
Don't let the ReplayTxn have a timeout of 0. |
boolean |
getRepGroupDbChange()
|
protected int |
getReplicatorNodeId()
|
boolean |
isReplicationDefined()
Used for debugging checks to ensure that replication-defined lockers are used for accessing replicated databases. |
void |
noteRepGroupDbChange()
|
void |
registerWithActiveTxns(Map<Long,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. |
String |
toString()
|
| Methods inherited from class com.sleepycat.je.txn.Locker |
|---|
addDeleteInfo, addToHandleMaps, demoteLock, dumpLockTable, getDefaultNoWait, getId, getLockTimeout, getPreemptable, getTxnTimeout, isReadUncommittedDefault, isTimedOut, lock, nonBlockingLock, openCursorHook, operationEnd, operationEnd, releaseLock, setClosingLocker, setLockTimeout, setPreemptable, setPreempted, setTxnTimeout, sharesLocksWith, transferHandleLock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReplayTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long txnId,
Map<Long,ReplayTxn> activeTxns,
Logger logger)
throws DatabaseException
DatabaseException
public ReplayTxn(EnvironmentImpl envImpl,
TransactionConfig config,
long txnId,
Logger logger)
throws DatabaseException
DatabaseException| Method Detail |
|---|
protected long getInitialLockTimeout()
getInitialLockTimeout in class Lockerpublic boolean getRepGroupDbChange()
public void noteRepGroupDbChange()
public void registerWithActiveTxns(Map<Long,ReplayTxn> newActiveTxns)
protected long generateId(TxnManager txnManager,
long mandatedId)
generateId in class Txnprotected int getReplicatorNodeId()
getReplicatorNodeId in class Txn
public long commit(Durability.SyncPolicy syncPolicy,
ReplicationContext clientRepContext,
int commitMasterNodeId)
throws DatabaseException
syncPolicy - to be used for the commit.clientRepContext - the replication context it encapsulates the VLSN
associated with the txn.
DatabaseExceptionpublic long commit()
Txn
commit in class Txnpublic long commit(Durability durability)
Txn
commit in class Txnpublic void abort()
Txn
abort in class Txnpublic long abort(boolean forceFlush)
Txn
abort in class Txn
public long abort(ReplicationContext clientRepContext,
int abortMasterNodeId)
throws DatabaseException
DatabaseException
protected void close(boolean isCommit)
throws DatabaseException
Txn
close in class TxnDatabaseException
public void cleanup()
throws DatabaseException
DatabaseException
public Collection<Long> rollback(long matchpointLsn)
throws DatabaseException
DatabaseExceptionpublic long elapsedTime()
public void setLastAppliedVLSN(VLSN justApplied)
public void setRepContext(ReplicationContext repContext)
public String toString()
toString in class Lockerpublic boolean isReplicationDefined()
Locker
isReplicationDefined in class Locker
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||