|
||||||||||
| 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.storage.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 | |
|---|---|
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 |
setAheadMaxTime(int aheadMaxTime)
Sets the aheadMaxTime value. |
void |
setCheckInterval(long timeInMillis)
Sets the number of milliseconds between slave position checks. |
void |
setLastHeader(ReplDBMSHeader header)
Sets the last header processed. |
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 sleepTime value. |
void |
setUrl(java.lang.String url)
Sets the JDBC URL to connect to the slave server. |
void |
setUser(java.lang.String user)
|
void |
setWarmUpEventCount(int warmUpEventCount)
Sets the warmUpEventCount value. |
TungstenProperties |
status()
Returns status information as a set of named properties. |
| Methods inherited from class com.continuent.tungsten.replicator.storage.InMemoryQueueStore |
|---|
configure, 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 setAheadMaxTime(int aheadMaxTime)
aheadMaxTime - Time in secondspublic void setSleepTime(int sleepTime)
sleepTime - The sleepTime to set.public void setWarmUpEventCount(int warmUpEventCount)
warmUpEventCount - The warmUpEventCount to set.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 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 | |||||||||