public final class CSNGenerator extends Object
Modifier and Type | Method and Description |
---|---|
void |
adjust(CSN csn)
Adjust the lastTime of this
CSNGenerator with a CSN that we have received from another server. |
void |
adjust(ServerState state)
Adjust utility method that takes ServerState as a parameter.
|
CSN |
newCSN()
Generate a new
CSN . |
static CSNGenerator |
newCSNGenerator(DomainReplicaId replicaId,
long timestamp)
Create a new
CSNGenerator . |
static CSNGenerator |
newCSNGenerator(ReplicaId replicaId,
long timestamp)
Create a new
CSNGenerator . |
static CSNGenerator |
newCSNGenerator(ReplicaId replicaId,
ServerState state)
Create a new
CSNGenerator . |
public static CSNGenerator newCSNGenerator(DomainReplicaId replicaId, long timestamp)
CSNGenerator
.replicaId
- id to use when creating CSN
s.timestamp
- time to start with.CSNGenerator
public static CSNGenerator newCSNGenerator(ReplicaId replicaId, long timestamp)
CSNGenerator
.replicaId
- id to use when creating CSN
s.timestamp
- time to start with.CSNGenerator
public static CSNGenerator newCSNGenerator(ReplicaId replicaId, ServerState state)
CSNGenerator
.replicaId
- replicaId to use when creating CSN
s.state
- This generator will be created in a way that makes sure that all CSN
s generated will be larger
than all the CSN
s currently in state.CSNGenerator
public void adjust(CSN csn)
CSNGenerator
with a CSN
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 larger than the received CSN
csn
- the CSN
to adjust withpublic void adjust(ServerState state)
state
- the ServerState to adjust withCopyright 2010-2022 ForgeRock AS.