public class CSNGenerator extends Object
Constructor and Description |
---|
CSNGenerator(int serverId,
long timestamp)
Create a new
CSNGenerator . |
CSNGenerator(int serverId,
ServerState state)
Create a new
CSNGenerator . |
Modifier and Type | Method and Description |
---|---|
void |
adjust(CSN number)
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 . |
public CSNGenerator(int serverId, long timestamp)
CSNGenerator
.serverId
- id to use when creating CSN
s.timestamp
- time to start with.public CSNGenerator(int serverId, ServerState state)
CSNGenerator
.public void adjust(CSN number)
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
number
- the CSN
to adjust withpublic void adjust(ServerState state)
state
- the ServerState to adjust withCopyright © 2010-2017 ForgeRock AS. All Rights Reserved.