public class LocalStateSync
extends java.lang.Object
sync() to drive the process. This class is needed
by proxy implementations which are run without a network environment. This
maintains the semantics of state synchronization which is necessary since
any local redirector environments have no Session object which would
otherwise service that requirement.| Modifier and Type | Field and Description |
|---|---|
private StateSynchronizer |
sink
Sink for state changes.
|
private StateSynchronizer |
source
Source of state changes.
|
| Constructor and Description |
|---|
LocalStateSync(StateSynchronizer source,
StateSynchronizer sink)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
sync()
Drive the state synchronization process by reading any pending changes
and applying them if any changes are available.
|
private StateSynchronizer source
private StateSynchronizer sink
public LocalStateSync(StateSynchronizer source, StateSynchronizer sink)
source - The state synchronizer from which to obtain changes. Must not
be null.sink - The state synchronizer in which to apply changes. Must not
be null.public void sync()
Changes are obtained via StateSynchronizer.getChanges() and they
are applied via StateSynchronizer.applyChanges(java.io.Externalizable). This method is
synchronized to make all processing thread-safe.