Class StreamId
java.lang.Object
org.forgerock.opendj.server.leaderbasedreplication.StreamId
- All Implemented Interfaces:
Comparable<StreamId>
Uniquely identifies a replication stream.
A replication stream is a sequence of changes that have been produced by a replica during its lifetime. Each time a replica is started, a new replication stream is created. This is allowing a single replica to apply simultaneously changes coming from client as well as its own previously produced changes coming from other replicas during a recovery from backup.
A StreamId is referencing the ReplicaId which created it as well as the timestamp at which it has
been created.
A StreamId can be encoded/decoded to/from a ReplicaId, allowing StreamId to be embedded
into the Csns of changes.
-
Method Summary
Modifier and TypeMethodDescriptionasCsn()Returns this stream as csn.intbooleaninthashCode()static StreamIdReturns a more readable string representation of thisStreamId.Returns theReplicaIdof the replica which created this stream.longReturns the timestamp at which this stream has been created.toJson()Returns a JSON representation of thisStreamId.toString()
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<StreamId>
-
replicaId
-
streamTimeStamp
public long streamTimeStamp()Returns the timestamp at which this stream has been created.- Returns:
- the timestamp at which this stream has been created
-
of
-
asCsn
-
toString
-
equals
-
hashCode
-
toJson
-
prettyPrint
-