|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.extractor.ExtractorWrapper
public class ExtractorWrapper
This class wraps a basic Extractor so that it returns ReplDBMSEvent values
with assigned sequence numbers. It contains logic to recognize that we have
failed over; see setLastEvent(ReplDBMSHeader) for more information.
| Constructor Summary | |
|---|---|
ExtractorWrapper(RawExtractor extractor)
Create a new instance to wrap Creates a new ExtractorWrapper
object |
|
| Method Summary | |
|---|---|
void |
configure(PluginContext context)
Complete plug-in configuration. |
ReplDBMSEvent |
extract()
Extracts a raw event and wraps it in a ReplDBMS complete with sequence number, which increments each time we process the last fragment. |
java.lang.String |
getCurrentResourceEventId()
Delegates to underlying extractor. |
RawExtractor |
getExtractor()
Return wrapped extractor. |
boolean |
hasMoreEvents()
Returns false until we implement caching. |
void |
prepare(PluginContext context)
Prepare plug-in for use. |
void |
release(PluginContext context)
Release all resources used by plug-in. |
void |
setLastEvent(ReplDBMSHeader header)
Set the value of the last event called. |
void |
setLastEventId(java.lang.String eventId)
Provides a new native event ID that overrides the default value that the extractor would otherwise use. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExtractorWrapper(RawExtractor extractor)
ExtractorWrapper
object
extractor - Extractor to be wrapped| Method Detail |
|---|
public RawExtractor getExtractor()
public ReplDBMSEvent extract()
throws ReplicatorException,
java.lang.InterruptedException
extract in interface ExtractorReplicatorException
java.lang.InterruptedExceptionExtractor.extract()
public java.lang.String getCurrentResourceEventId()
throws ReplicatorException,
java.lang.InterruptedException
getCurrentResourceEventId in interface ExtractorReplicatorException
java.lang.InterruptedExceptionExtractor.getCurrentResourceEventId()public boolean hasMoreEvents()
hasMoreEvents in interface ExtractorExtractor.hasMoreEvents()
public void setLastEvent(ReplDBMSHeader header)
throws ReplicatorException
setLastEvent in interface Extractorheader - Last event we extracted
ReplicatorExceptionExtractor.setLastEvent(com.continuent.tungsten.replicator.event.ReplDBMSHeader)
public void setLastEventId(java.lang.String eventId)
throws ReplicatorException
setLastEventId in interface ExtractoreventId - Event ID at which to begin extracting
ReplicatorExceptionExtractor.setLastEventId(java.lang.String)
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 | |||||||||