|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.thl.RemoteTHLExtractor
public class RemoteTHLExtractor
Implements an extractor to pull events from a remote THL.
This class has specialized concurrency requirements as there is a potential race condition to close connections within the task thread and thread trying to shut down the pipeline. The race arises due the fact that connections may hang when connecting or reading from a connection to a dropped interface and do not accept interrupts. They need to be interrupted by closing the connection. For this reason, closing the connection is synchronized.
| Constructor Summary | |
|---|---|
RemoteTHLExtractor()
Create Connector instance. |
|
| Method Summary | |
|---|---|
void |
configure(PluginContext context)
Complete plug-in configuration. |
ReplDBMSEvent |
extract()
Extract the next available event from the log. |
java.util.List<java.lang.String> |
getConnectUri()
|
java.lang.String |
getCurrentResourceEventId()
Does not make sense for this extractor type. |
int |
getHeartbeatInterval()
|
java.lang.String |
getPreferredRole()
Returns the preferred master server role. |
int |
getPreferredRoleTimeout()
|
int |
getResetPeriod()
|
int |
getRetryInterval()
|
boolean |
hasMoreEvents()
Returns true if there are additional events that may be read as part of block commit processing. |
boolean |
isCheckSerialization()
|
void |
prepare(PluginContext context)
Prepare plug-in for use. |
void |
release(PluginContext context)
Release all resources used by plug-in. |
void |
setCheckSerialization(boolean checkSerialization)
If true, check epoch number and sequence number of last event we have received. |
void |
setConnectUri(java.util.List<java.lang.String> connectUri)
Set the URI(s) of the store to which we connect. |
void |
setHeartbeatInterval(int heartbeatMillis)
Sets the interval for sending heartbeat events from server to avoid TCP/IP timeout on server connection. |
void |
setLastEvent(ReplDBMSHeader event)
Set the value of the last event called. |
void |
setLastEventId(java.lang.String eventId)
Sets the last event ID for extraction. |
void |
setPreferredRole(java.lang.String preferredRole)
Sets the preferred role of the master replicator. |
void |
setPreferredRoleTimeout(int preferredRoleTimeout)
Sets the timeout to find the preferred master role in seconds. |
void |
setResetPeriod(int resetPeriod)
Set the number of iterations before resetting the communications stream. |
void |
setRetryInterval(int retryTimeout)
Sets the timeout between connection retries in seconds. |
void |
shutdown(PluginContext context)
Shut down component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteTHLExtractor()
| Method Detail |
|---|
public java.util.List<java.lang.String> getConnectUri()
public void setConnectUri(java.util.List<java.lang.String> connectUri)
connectUri - public int getResetPeriod()
public void setResetPeriod(int resetPeriod)
public boolean isCheckSerialization()
public void setCheckSerialization(boolean checkSerialization)
checkSerialization - public int getHeartbeatInterval()
public void setHeartbeatInterval(int heartbeatMillis)
public java.lang.String getPreferredRole()
public void setPreferredRole(java.lang.String preferredRole)
public int getPreferredRoleTimeout()
public void setPreferredRoleTimeout(int preferredRoleTimeout)
public int getRetryInterval()
public void setRetryInterval(int retryTimeout)
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.InterruptedExceptionpublic boolean hasMoreEvents()
Extractor
hasMoreEvents in interface Extractor
public void setLastEvent(ReplDBMSHeader event)
throws ReplicatorException
Extractor
setLastEvent in interface Extractorevent - Last event we extracted
ReplicatorException
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 shutdown(PluginContext context)
throws ReplicatorException,
java.lang.InterruptedException
shutdown in interface ShutdownHookReplicatorException - Thrown if shutdown is unsuccessful
java.lang.InterruptedExceptionShutdownHook.shutdown(com.continuent.tungsten.replicator.plugin.PluginContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||