com.sleepycat.je.log
Class ReplicationContext
java.lang.Object
com.sleepycat.je.log.ReplicationContext
- Direct Known Subclasses:
- DbOpReplicationContext
public class ReplicationContext
- extends java.lang.Object
ReplicationContext provides context about high-level operations so that the
logging level can determine which replication related actions are required
for a given Loggable item.
Those lower level actions are:
- does a log entry need to be logged with a VLSN generated by this
(master) node?
- does the log entry need to be logged with the VLSN which accompanied a
replication message?
- do we need to wait for PERM acks after logging an entry?
- do we need to record the client VLSN that was just written to the log?
ReplicationContext subclasses may hold additional information about the
logical operation which instigated logging, so that this can be added
to the log entry.
All LogEntryType(s) have a "replicationPossible" attribute. For example,
INs will never be replicated, but LN_TX's may or may not be replicated,
depending on whether the owning database is replicated.
If a LogEntryType will never be replicated, it should be logged with
the static ReplicationContext.NO_REPLICATE instance.
If replication is possible, the replication context may be:
- one allocated for this operation, as the result of client apply
- the static instance MASTER, if this node is the replication master
- the static instance NO_REPLICATE, if this is a local operation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MASTER
public static final ReplicationContext MASTER
NO_REPLICATE
public static final ReplicationContext NO_REPLICATE
ReplicationContext
protected ReplicationContext(boolean inReplicationStream)
ReplicationContext
public ReplicationContext(VLSN clientVLSN)
- Used to pass the VLSN held in an arriving message down to the logging
levels.
getDbOperationType
public DbOperationType getDbOperationType()
- Returns:
- the type of database operation in progress. For the default
case, we return DbOperationType.NONE.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object