Class CSNGenerator
- java.lang.Object
-
- org.opends.server.replication.common.CSNGenerator
-
public class CSNGenerator extends Object
-
-
Constructor Summary
Constructors Constructor Description CSNGenerator(int serverId, long timestamp)Create a newCSNGenerator.CSNGenerator(int serverId, ServerState state)Create a newCSNGenerator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadjust(CSN number)Adjust the lastTime of thisCSNGeneratorwith aCSNthat we have received from another server.voidadjust(ServerState state)Adjust utility method that takes ServerState as a parameter.CSNnewCSN()Generate a newCSN.
-
-
-
Constructor Detail
-
CSNGenerator
public CSNGenerator(int serverId, long timestamp)Create a newCSNGenerator.- Parameters:
serverId- id to use when creatingCSNs.timestamp- time to start with.
-
CSNGenerator
public CSNGenerator(int serverId, ServerState state)Create a newCSNGenerator.
-
-
Method Detail
-
adjust
public void adjust(CSN number)
Adjust the lastTime of thisCSNGeneratorwith aCSNthat we have received from another server.This is necessary because we need that the
CSNgenerated after processing an update received from other hosts to be larger than the receivedCSN- Parameters:
number- theCSNto adjust with
-
adjust
public void adjust(ServerState state)
Adjust utility method that takes ServerState as a parameter.- Parameters:
state- the ServerState to adjust with
-
-