public abstract class AbstractReplicator extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractReplicator.ActivityLevel
Activity level of a replicator.
|
static class |
AbstractReplicator.Progress
Progress of a replicator.
|
static class |
AbstractReplicator.Status
Combined activity level and progress of a replicator.
|
Constructor and Description |
---|
AbstractReplicator(ReplicatorConfiguration config)
Initializes a replicator with the given configuration.
|
Modifier and Type | Method and Description |
---|---|
ListenerToken |
addChangeListener(Executor executor,
ReplicatorChangeListener listener)
Set the given ReplicatorChangeListener to the this replicator.
|
ListenerToken |
addChangeListener(ReplicatorChangeListener listener) |
ListenerToken |
addDocumentReplicationListener(DocumentReplicationListener listener)
Set the given DocumentReplicationListener to the this replicator.
|
ListenerToken |
addDocumentReplicationListener(Executor executor,
DocumentReplicationListener listener)
Set the given DocumentReplicationListener to the this replicator.
|
ReplicatorConfiguration |
getConfig()
The replicator's configuration.
|
AbstractReplicator.Status |
getStatus()
The replicator's current status: its activity level and progress.
|
void |
removeChangeListener(ListenerToken token)
Remove the given ReplicatorChangeListener or DocumentReplicationListener from the this replicator.
|
void |
resetCheckpoint()
Resets the local checkpoint of the replicator, meaning that it will read all
changes since the beginning of time from the remote database.
|
void |
start()
Starts the replicator.
|
void |
stop()
Stops a running replicator.
|
String |
toString() |
public AbstractReplicator(ReplicatorConfiguration config)
config
- public void start()
public void stop()
public ReplicatorConfiguration getConfig()
public AbstractReplicator.Status getStatus()
public ListenerToken addChangeListener(ReplicatorChangeListener listener)
public ListenerToken addChangeListener(Executor executor, ReplicatorChangeListener listener)
listener
- public void removeChangeListener(ListenerToken token)
public ListenerToken addDocumentReplicationListener(DocumentReplicationListener listener)
listener
- public ListenerToken addDocumentReplicationListener(Executor executor, DocumentReplicationListener listener)
listener
- public void resetCheckpoint()