|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.storage.InMemoryQueueStore
com.continuent.tungsten.replicator.prefetch.PrefetchStore
public class PrefetchStore
Implements a specialized store for handling slave prefetch from another replicator. This store coordinates restart at the current slave position and implements logic to drop events that are not far enough ahead of the slave position or have already been executed.
| Field Summary |
|---|
| Fields inherited from class com.continuent.tungsten.replicator.storage.InMemoryQueueStore |
|---|
lastHeader, maxSize, name, partitions, queue, transactionCount |
| Constructor Summary | |
|---|---|
PrefetchStore()
|
|
| Method Summary | |
|---|---|
void |
configure(PluginContext context)
Complete plug-in configuration. |
ReplDBMSEvent |
filter(ReplDBMSEvent event)
Filter the event if it has already been executed. |
ReplDBMSHeader |
getLastHeader()
Returns the position of the slave on which we are handling prefetch. |
void |
prepare(PluginContext context)
Prepare prefetch store. |
void |
put(ReplDBMSEvent event)
Puts an event in the queue, blocking if it is full. |
void |
release(PluginContext context)
Release queue. |
void |
setAllowAll(boolean allowAll)
Allow all events regardless of position of slave service we are tracking. |
void |
setCheckInterval(long timeInMillis)
Sets the number of milliseconds between slave position checks. |
void |
setLastHeader(ReplDBMSHeader header)
Sets the last header processed. |
void |
setMaxTimeAhead(int aheadMaxTime)
Sets the maximum number of seconds that event should be from the last event applied by the slave. |
void |
setMinTimeAhead(int aheadMinTime)
Sets the minimum number of seconds ahead of slave in order to accept an event for prefetch. |
void |
setPassword(java.lang.String password)
Sets the password of the database login to check slave position. |
void |
setSlaveCatalogSchema(java.lang.String slaveCatalogSchema)
Sets the catalog schema name of the slave for which we are prefetching. |
void |
setSleepTime(int sleepTime)
Sets the number of milliseconds to sleep when we get too far ahead of the slave. |
void |
setUrl(java.lang.String url)
Sets the JDBC URL to connect to the slave server. |
void |
setUser(java.lang.String user)
|
TungstenProperties |
status()
Returns status information as a set of named properties. |
| Methods inherited from class com.continuent.tungsten.replicator.storage.InMemoryQueueStore |
|---|
get, getMaxSize, getMaxStoredSeqno, getMinStoredSeqno, getName, peek, poll, setMaxOfflineInterval, setMaxSize, setName, setPartitionerClass, setPartitions, setSyncInterval, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrefetchStore()
| Method Detail |
|---|
public void setUrl(java.lang.String url)
public void setUser(java.lang.String user)
public void setPassword(java.lang.String password)
public void setSlaveCatalogSchema(java.lang.String slaveCatalogSchema)
public void setCheckInterval(long timeInMillis)
timeInMillis - public void setMinTimeAhead(int aheadMinTime)
aheadMinTime - Minimum lead time in secondspublic void setMaxTimeAhead(int aheadMaxTime)
aheadMaxTime - Maximum lead time in secondspublic void setSleepTime(int sleepTime)
sleepTime - The sleepTime to set.public void setAllowAll(boolean allowAll)
public void setLastHeader(ReplDBMSHeader header)
setLastHeader in class InMemoryQueueStorepublic ReplDBMSHeader getLastHeader()
getLastHeader in class InMemoryQueueStore
public void put(ReplDBMSEvent event)
throws java.lang.InterruptedException,
ReplicatorException
put in class InMemoryQueueStoreReplicatorException
java.lang.InterruptedException
public void configure(PluginContext context)
throws ReplicatorException
configure in interface ReplicatorPluginconfigure in class InMemoryQueueStoreReplicatorException - Thrown if configuration is incomplete or
failsInMemoryQueueStore.configure(com.continuent.tungsten.replicator.plugin.PluginContext)
public void prepare(PluginContext context)
throws ReplicatorException
prepare in interface ReplicatorPluginprepare in class InMemoryQueueStoreReplicatorException - Thrown if resource allocation failsReplicatorPlugin.prepare(com.continuent.tungsten.replicator.plugin.PluginContext)
public void release(PluginContext context)
throws ReplicatorException
release in interface ReplicatorPluginrelease in class InMemoryQueueStoreReplicatorException - Thrown if resource deallocation failsReplicatorPlugin.release(com.continuent.tungsten.replicator.plugin.PluginContext)public TungstenProperties status()
status in interface Storestatus in class InMemoryQueueStoreStore.status()
public ReplDBMSEvent filter(ReplDBMSEvent event)
throws ReplicatorException,
java.lang.InterruptedException
ReplicatorException
java.lang.InterruptedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||