|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.storage.InMemoryQueueAdapter
public class InMemoryQueueAdapter
Implements Extractor and Applier interfaces for an in-memory queue.
| Constructor Summary | |
|---|---|
InMemoryQueueAdapter()
Instantiate the adapter. |
|
| Method Summary | |
|---|---|
void |
apply(ReplDBMSEvent event,
boolean doCommit,
boolean doRollback,
boolean syncTHL)
Apply the proffered event to the replication target. |
void |
commit()
This method is meaningless for an in-memory queue, which is non-transactional. |
void |
configure(PluginContext context)
Complete plug-in configuration. |
ReplDBMSEvent |
extract()
Extract the next available event from the log. |
java.lang.String |
getCurrentResourceEventId()
Returns the last event ID committed in a database from which we are extracting. |
ReplDBMSHeader |
getLastEvent()
Return the header, which should have been place here by an extractor during restart. |
java.lang.String |
getStoreName()
|
boolean |
hasMoreEvents()
Returns true if the queue has more events. |
void |
prepare(PluginContext context)
Connect to underlying queue. |
void |
release(PluginContext context)
Release all resources used by plug-in. |
void |
rollback()
This method is meaningless for an in-memory queue, which is non-transactional. |
void |
setLastEvent(ReplDBMSHeader header)
Store the header so that it can be propagated back through the pipeline for restart. |
void |
setLastEventId(java.lang.String eventId)
Ignored for now as in-memory queues do not extract. |
void |
setStoreName(java.lang.String storeName)
|
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 InMemoryQueueAdapter()
| Method Detail |
|---|
public java.lang.String getStoreName()
public void setStoreName(java.lang.String storeName)
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
configure in interface ReplicatorPluginReplicatorException - Thrown if configuration is incomplete or
failsReplicatorPlugin.configure(com.continuent.tungsten.replicator.plugin.PluginContext)
public void prepare(PluginContext context)
throws ReplicatorException
prepare in interface ReplicatorPluginReplicatorException - Thrown if resource allocation failsReplicatorPlugin.prepare(com.continuent.tungsten.replicator.plugin.PluginContext)
public void release(PluginContext context)
throws ReplicatorException
release in interface ReplicatorPluginReplicatorException - Thrown if resource deallocation failsReplicatorPlugin.release(com.continuent.tungsten.replicator.plugin.PluginContext)
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(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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||