|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Synchronizer
This interface defines the protocol for starting, stopping, and executing a long-running, repeatable, and possibly recursive "synchronization" process. The intent is for the synchronizer to synchronize a "secondary" model with a "primary" model. Any change to the "primary" model will trigger the synchronization. The synchronizer implementation will determine whether the "secondary" model remains in sync synchronously or asynchronously.
The assumption is that the start() and stop() methods will be called from
a single master thread that would control the synchronizer's lifecycle and
the synchronize() method will be called multiple times, possibly from
multiple threads.
| Nested Class Summary | |
|---|---|
static class |
Synchronizer.Null
Singleton implementation of the Synchronizer interface that will do
nothing. |
| Method Summary | |
|---|---|
void |
start()
Enable the synchronizer to allow future synchronizations as requested by calls to synchronize(). |
void |
stop()
Stop the synchronizer immediately or, if a synchronization is currently in progress, when it completes. |
void |
synchronize()
Synchronize the dependent model with the primary model. |
| Method Detail |
|---|
void start()
synchronize().
void synchronize()
start() has not previously been called. Do nothing if stop()
has been called (without any intermediate call to start().
void stop()
start() is called.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||