public class Replicator extends Object implements NetworkReachabilityListener
Modifier and Type | Class and Description |
---|---|
static class |
Replicator.ActivityLevel
Activity level of a replicator.
|
class |
Replicator.Progress
Progress of a replicator.
|
class |
Replicator.Status
Combined activity level and progress of a replicator.
|
Constructor and Description |
---|
Replicator(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) |
protected void |
finalize() |
ReplicatorConfiguration |
getConfig()
The replicator's configuration.
|
Replicator.Status |
getStatus()
The replicator's current status: its activity level and progress.
|
void |
networkReachable() |
void |
networkUnreachable() |
void |
removeChangeListener(ListenerToken token)
Remove the given ReplicatorChangeListener from the this replicator.
|
void |
start()
Starts the replicator.
|
void |
stop()
Stops a running replicator.
|
String |
toString() |
public Replicator(ReplicatorConfiguration config)
config
- public void start()
public void stop()
public ReplicatorConfiguration getConfig()
public Replicator.Status getStatus()
public ListenerToken addChangeListener(ReplicatorChangeListener listener)
public ListenerToken addChangeListener(Executor executor, ReplicatorChangeListener listener)
listener
- public void removeChangeListener(ListenerToken token)
public void networkReachable()
networkReachable
in interface NetworkReachabilityListener
public void networkUnreachable()
networkUnreachable
in interface NetworkReachabilityListener