Class CSNGenerator
java.lang.Object
org.opends.server.replication.common.CSNGenerator
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adjust the lastTime of thisCSNGenerator
with aCSN
that we have received from another server.void
adjust
(ServerState state) Adjust utility method that takes ServerState as a parameter.newCSN()
Generate a newCSN
.static CSNGenerator
newCSNGenerator
(ReplicaId replicaId, long timestamp) Create a newCSNGenerator
.static CSNGenerator
newCSNGenerator
(ReplicaId replicaId, ServerState state) Create a newCSNGenerator
.static CSNGenerator
newCSNGenerator
(DomainReplicaId replicaId, long timestamp) Create a newCSNGenerator
.
-
Method Details
-
newCSNGenerator
Create a newCSNGenerator
.- Parameters:
replicaId
- id to use when creatingCSN
s.timestamp
- time to start with.- Returns:
- the new
CSNGenerator
-
newCSNGenerator
Create a newCSNGenerator
.- Parameters:
replicaId
- id to use when creatingCSN
s.timestamp
- time to start with.- Returns:
- the new
CSNGenerator
-
newCSNGenerator
Create a newCSNGenerator
.- Parameters:
replicaId
- replicaId to use when creatingCSN
s.state
- This generator will be created in a way that makes sure that allCSN
s generated will be larger than all theCSN
s currently in state.- Returns:
- the new
CSNGenerator
-
newCSN
Generate a newCSN
.- Returns:
- the generated
CSN
-
adjust
Adjust utility method that takes ServerState as a parameter.- Parameters:
state
- the ServerState to adjust with
-
adjust
Adjust the lastTime of thisCSNGenerator
with aCSN
that we have received from another server.This is necessary because we need that the
CSN
generated after processing an update received from other hosts to be as close as possible to the receivedCSN
in order to have a global ordering that is close to wall-clock time.- Parameters:
csn
- theCSN
to adjust with
-