com.continuent.tungsten.replicator.applier
Class DummyApplier

java.lang.Object
  extended by com.continuent.tungsten.replicator.applier.DummyApplier
All Implemented Interfaces:
RawApplier, ReplicatorPlugin

public class DummyApplier
extends java.lang.Object
implements RawApplier


Constructor Summary
DummyApplier()
           
 
Method Summary
 void apply(DBMSEvent event, ReplDBMSHeader header, boolean doCommit, boolean doRollback)
          Apply the proffered event to the replication target.
 void commit()
          Commits current open transaction to ensure data applied up to current point are durable.
 void configure(PluginContext context)
          Complete plug-in configuration.
 long getEventCount()
           
 ReplDBMSHeader getLastEvent()
          Return header information corresponding to last committed event.
 java.util.ArrayList<StatementData> getTrx()
           
 long getTxnCount()
           
 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 setStoreAppliedEvents(boolean store)
           
 void setTaskId(int id)
          Sets the ID of the task using this raw applier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyApplier

public DummyApplier()
Method Detail

setStoreAppliedEvents

public void setStoreAppliedEvents(boolean store)

setTaskId

public void setTaskId(int id)
Sets the ID of the task using this raw applier.

Specified by:
setTaskId in interface RawApplier
Parameters:
id - Task ID
See Also:
RawApplier.setTaskId(int)

apply

public void apply(DBMSEvent event,
                  ReplDBMSHeader header,
                  boolean doCommit,
                  boolean doRollback)
           throws ReplicatorException
Apply the proffered event to the replication target.

Specified by:
apply in interface RawApplier
Parameters:
event - Event to be applied. If a DBMSEmptyEvent, just mark the apply position.
header - Header data corresponding to event
doCommit - Boolean flag indicating whether this is the last part of multi-part event
doRollback - Boolean flag indicating whether this transaction should rollback
Throws:
ReplicatorException - Thrown if applier processing fails
ConsistencyException - Thrown if the applier detects that a consistency check has failed
See Also:
RawApplier.apply(com.continuent.tungsten.replicator.event.DBMSEvent, com.continuent.tungsten.replicator.event.ReplDBMSHeader, boolean, boolean)

commit

public void commit()
Description copied from interface: RawApplier
Commits current open transaction to ensure data applied up to current point are durable.

Specified by:
commit in interface RawApplier

rollback

public void rollback()
              throws java.lang.InterruptedException
Description copied from interface: RawApplier
Rolls back any current work.

Specified by:
rollback in interface RawApplier
Throws:
java.lang.InterruptedException - Thrown if the applier is interrupted.

getLastEvent

public ReplDBMSHeader getLastEvent()
                            throws ReplicatorException,
                                   java.lang.InterruptedException
Description copied from interface: RawApplier
Return header information corresponding to last committed event.

Specified by:
getLastEvent in interface RawApplier
Returns:
Header data for last committed event.
Throws:
ReplicatorException - Thrown if getting sequence number fails
java.lang.InterruptedException - Thrown if the applier is interrupted

configure

public void configure(PluginContext context)
Description copied from interface: ReplicatorPlugin
Complete plug-in configuration. This is called after setters are invoked at the time that the replicator goes through configuration.

Specified by:
configure in interface ReplicatorPlugin

prepare

public void prepare(PluginContext context)
Description copied from interface: ReplicatorPlugin
Prepare plug-in for use. This method is assumed to allocate all required resources. It is called before the plug-in performs any operations.

Specified by:
prepare in interface ReplicatorPlugin

release

public void release(PluginContext context)
Description copied from interface: ReplicatorPlugin
Release all resources used by plug-in. This is called before the plug-in is deallocated.

Specified by:
release in interface ReplicatorPlugin

getTrx

public java.util.ArrayList<StatementData> getTrx()

getEventCount

public long getEventCount()

getTxnCount

public long getTxnCount()