POJO used for exchanging node state information between servers;
also stored in the local database.
Constructor used for constructing initial entry, when no persisted
information is available. As such, will not contain valid sync range
information, but just range information for node itself.
Constructor used for initializing state from definitions; used
first time configurations are read.
localNode definition of local node (one on which service runs)
remoteNode definition of a peer node; node for which state
is to be created (and which will be synced with local node)
updateTime Timestamp when last update was made; usually passed
Constructor called when creating a peer node from information returned
piggy-backed on Sync List response.
KeyRange newSyncRange, long newSyncedUpTo)
long lastUpdated, long lastSyncAttempt, long syncedUpTo)
Fluent factory for creating new state with sync range calculated
using specified local node state.
Equality is specifically defined to encompass just a subset of information:
- Endpoint (ip+port)
- Active Range
- Passive Range
if (o == this) return true;
if (o == null) return false;