|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.applier.ApplierWrapper
public class ApplierWrapper
This class wraps a basic Applier so that it handles ReplDBMSEvent values with assigned sequence numbers.
| Constructor Summary | |
|---|---|
ApplierWrapper(RawApplier applier)
Create a new instance to wrap a raw applier. |
|
| Method Summary | |
|---|---|
void |
apply(ReplDBMSEvent event,
boolean doCommit,
boolean doRollback,
boolean syncTHL)
Apply the DBMSEvent in the ReplDBMSEvent. |
void |
commit()
Commits current open transaction to ensure data applied up to current point are durable. |
void |
configure(PluginContext context)
Complete plug-in configuration. |
RawApplier |
getApplier()
Return wrapped applier. |
ReplDBMSHeader |
getLastEvent()
Return header information corresponding to last committed transaction. |
void |
prepare(PluginContext context)
Prepare plug-in for use. |
void |
release(PluginContext context)
Release all resources used by plug-in. |
void |
rollback()
Rolls back any current work. |
void |
setTaskId(int id)
Sets the ID of the task using this applier. |
void |
updatePosition(ReplDBMSHeader header,
boolean doCommit,
boolean syncTHL)
Update current recovery position but do not apply an event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApplierWrapper(RawApplier applier)
applier - Extractor to be wrapped| Method Detail |
|---|
public RawApplier getApplier()
public void setTaskId(int id)
setTaskId in interface ParallelApplierid - Task IDParallelApplier.setTaskId(int)
public void apply(ReplDBMSEvent event,
boolean doCommit,
boolean doRollback,
boolean syncTHL)
throws ReplicatorException,
ConsistencyException,
java.lang.InterruptedException
apply in interface Applierevent - Event to be applieddoCommit - Boolean flag indicating whether this is the last part of
multipart eventdoRollback - Boolean flag indicating whether this transaction should
rollbacksyncTHL - Should this applier synchronize the trep_commit_seqno
table? This should be false for slave.
ReplicatorException - Thrown if applier processing fails
ConsistencyException - Thrown if the applier detects that a
consistency check has failed
java.lang.InterruptedException - Thrown if the applier is interruptedApplier.apply(com.continuent.tungsten.replicator.event.ReplDBMSEvent,
boolean, boolean, boolean)
public void updatePosition(ReplDBMSHeader header,
boolean doCommit,
boolean syncTHL)
throws ReplicatorException,
java.lang.InterruptedException
updatePosition in interface Applierheader - Header containing seqno, event ID, etc.doCommit - Boolean flag indicating whether this is the last part of
multipart eventsyncTHL - Should this applier synchronize the trep_commit_seqno
table? This should be false for slave.
ReplicatorException - Thrown if applier processing fails
java.lang.InterruptedException - Thrown if the applier is interruptedApplier.updatePosition(com.continuent.tungsten.replicator.event.ReplDBMSHeader,
boolean, boolean)
public void commit()
throws ReplicatorException,
java.lang.InterruptedException
commit in interface ApplierReplicatorException - Thrown if applier processing fails
java.lang.InterruptedException - Thrown if the applier is interruptedApplier.commit()
public void rollback()
throws java.lang.InterruptedException
rollback in interface Applierjava.lang.InterruptedExceptionApplier.rollback()
public ReplDBMSHeader getLastEvent()
throws ReplicatorException,
java.lang.InterruptedException
getLastEvent in interface ApplierReplicatorException - Thrown if getting sequence number fails
java.lang.InterruptedException - Thrown if the applier is interruptedApplier.getLastEvent()
public void configure(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
configure in interface ReplicatorPluginReplicatorException - Thrown if configuration is incomplete or
fails
java.lang.InterruptedExceptionReplicatorPlugin.configure(com.continuent.tungsten.replicator.plugin.PluginContext)
public void prepare(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
prepare in interface ReplicatorPluginReplicatorException - Thrown if resource allocation fails
java.lang.InterruptedExceptionReplicatorPlugin.prepare(com.continuent.tungsten.replicator.plugin.PluginContext)
public void release(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
release in interface ReplicatorPluginReplicatorException - Thrown if resource deallocation fails
java.lang.InterruptedExceptionReplicatorPlugin.release(com.continuent.tungsten.replicator.plugin.PluginContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||