|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.pipeline.Stage
public class Stage
Stores the implementation of a single replicator processing stage, which consists of extract, filtering, and apply operations.
| Constructor Summary | |
|---|---|
Stage(Pipeline pipeline)
Creates a new stage instance. |
|
| Method Summary | |
|---|---|
void |
configure(PluginContext context)
Complete plug-in configuration. |
protected void |
configurePlugin(ReplicatorPlugin plugin,
PluginContext context)
Call configure method on a plugin class. |
Applier |
getApplier0()
|
PluginSpecification |
getApplierSpec()
|
long |
getApplySkipCount()
|
Interval |
getBlockCommitInterval()
Return the minimum time interval to wait before committing when using block commit. |
int |
getBlockCommitRowCount()
Returns the maximum number of transactions to apply before committing. |
Extractor |
getExtractor0()
|
PluginSpecification |
getExtractorSpec()
|
java.util.List<Filter> |
getFilters0()
|
java.util.List<PluginSpecification> |
getFilterSpecs()
|
java.lang.String |
getInitialEventId()
|
java.lang.String |
getName()
|
Pipeline |
getPipeline()
Returns the pipeline value. |
PluginContext |
getPluginContext()
|
StageProgressTracker |
getProgressTracker()
|
java.util.List<ShardProgress> |
getShardProgress()
Returns shard progress instances ordered by shard ID. |
int |
getTaskCount()
|
StageTaskGroup |
getTaskGroup()
|
java.util.List<TaskProgress> |
getTaskProgress()
Returns task progress instances ordered by task ID. |
boolean |
isAutoSync()
|
boolean |
isShutdown()
Returns true if the stage has stopped. |
void |
prepare(PluginContext context)
Prepare plug-in for use. |
protected void |
preparePlugin(ReplicatorPlugin plugin,
PluginContext context)
Call prepare method on a plugin class. |
void |
release(PluginContext context)
Release all resources used by plug-in. |
protected void |
releasePlugin(ReplicatorPlugin plugin,
PluginContext context)
Call release method on a plugin class, warning on errors. |
void |
setApplierSpec(PluginSpecification applier)
|
void |
setApplySkipCount(long applySkipCount)
|
void |
setApplySkipEvents(java.util.SortedSet<java.lang.Long> seqnos)
|
void |
setAutoSync(boolean autoSync)
|
void |
setBlockCommitInterval(Interval blockCommitInterval)
|
void |
setBlockCommitRowCount(int blockCommitRowCount)
|
void |
setExtractorSpec(PluginSpecification extractor)
|
void |
setFilterSpecs(java.util.List<PluginSpecification> filters)
|
void |
setInitialEventId(java.lang.String initialEventId)
|
void |
setLoggingInterval(long loggingInterval)
|
void |
setName(java.lang.String name)
|
void |
setTaskCount(int taskCount)
|
void |
shutdown(boolean immediate)
Shut down tasks threads that implement the stage. |
void |
start(com.continuent.tungsten.fsm.event.EventDispatcher dispatcher)
Start task thread(s) that implement this stage. |
java.util.concurrent.Future<ReplDBMSHeader> |
watchForCommittedSequenceNumber(long seqno,
boolean terminate)
Sets a watch for a particular sequence number to be safely committed on all channels. |
java.util.concurrent.Future<ReplDBMSHeader> |
watchForProcessedEventId(java.lang.String eventId,
boolean terminate)
Sets a watch for a particular event ID to be extracted. |
java.util.concurrent.Future<ReplDBMSHeader> |
watchForProcessedHeartbeat(java.lang.String name,
boolean terminate)
Sets a watch for a heartbeat event to be extracted. |
java.util.concurrent.Future<ReplDBMSHeader> |
watchForProcessedSequenceNumber(long seqno,
boolean terminate)
Sets a watch for a particular sequence number to be processed. |
java.util.concurrent.Future<ReplDBMSHeader> |
watchForProcessedTimestamp(java.sql.Timestamp timestamp,
boolean terminate)
Sets a watch for a source timestamp to be extracted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Stage(Pipeline pipeline)
pipeline - Pipeline to which this stage belongs.| Method Detail |
|---|
public java.lang.String getName()
public int getTaskCount()
public PluginSpecification getExtractorSpec()
public java.util.List<PluginSpecification> getFilterSpecs()
public PluginSpecification getApplierSpec()
public StageProgressTracker getProgressTracker()
public StageTaskGroup getTaskGroup()
public PluginContext getPluginContext()
public int getBlockCommitRowCount()
public Interval getBlockCommitInterval()
public void setName(java.lang.String name)
public void setTaskCount(int taskCount)
public void setExtractorSpec(PluginSpecification extractor)
public void setFilterSpecs(java.util.List<PluginSpecification> filters)
public void setApplierSpec(PluginSpecification applier)
public void setBlockCommitRowCount(int blockCommitRowCount)
public void setBlockCommitInterval(Interval blockCommitInterval)
public void setLoggingInterval(long loggingInterval)
public java.lang.String getInitialEventId()
public void setInitialEventId(java.lang.String initialEventId)
public long getApplySkipCount()
public void setApplySkipCount(long applySkipCount)
public boolean isAutoSync()
public void setAutoSync(boolean autoSync)
public java.util.List<TaskProgress> getTaskProgress()
public java.util.List<ShardProgress> getShardProgress()
public Applier getApplier0()
public java.util.List<Filter> getFilters0()
public Extractor getExtractor0()
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
release in interface ReplicatorPluginReplicatorExceptionReplicatorPlugin.release(com.continuent.tungsten.replicator.plugin.PluginContext)
public void start(com.continuent.tungsten.fsm.event.EventDispatcher dispatcher)
throws ReplicatorException
ReplicatorExceptionpublic void shutdown(boolean immediate)
public boolean isShutdown()
public java.util.concurrent.Future<ReplDBMSHeader> watchForCommittedSequenceNumber(long seqno,
boolean terminate)
throws java.lang.InterruptedException
seqno - Sequence number to watch forterminate - If true, terminate task when watch is successful
java.lang.InterruptedException
public java.util.concurrent.Future<ReplDBMSHeader> watchForProcessedSequenceNumber(long seqno,
boolean terminate)
throws java.lang.InterruptedException
seqno - Sequence number to watch forterminate - If true, terminate task when watch is successful
java.lang.InterruptedException
public java.util.concurrent.Future<ReplDBMSHeader> watchForProcessedEventId(java.lang.String eventId,
boolean terminate)
throws java.lang.InterruptedException
eventId - Native event ID to watch forterminate - If true, terminate task when watch is successful
java.lang.InterruptedException
public java.util.concurrent.Future<ReplDBMSHeader> watchForProcessedHeartbeat(java.lang.String name,
boolean terminate)
throws java.lang.InterruptedException
terminate - If true, terminate task when watch is successful
java.lang.InterruptedException
public java.util.concurrent.Future<ReplDBMSHeader> watchForProcessedTimestamp(java.sql.Timestamp timestamp,
boolean terminate)
throws java.lang.InterruptedException
timestamp - Timestamp to watch forterminate - If true, terminate task when watch is successful
java.lang.InterruptedException
protected void configurePlugin(ReplicatorPlugin plugin,
PluginContext context)
throws ReplicatorException
ReplicatorException
protected void preparePlugin(ReplicatorPlugin plugin,
PluginContext context)
throws ReplicatorException
ReplicatorException
protected void releasePlugin(ReplicatorPlugin plugin,
PluginContext context)
public Pipeline getPipeline()
public void setApplySkipEvents(java.util.SortedSet<java.lang.Long> seqnos)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||