Class TopologyRevision
java.lang.Object
com.couchbase.client.core.topology.TopologyRevision
- All Implemented Interfaces:
Comparable<TopologyRevision>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TopologyRevision
A synthetic revision, older than anything the server could send. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
long
epoch()
boolean
int
hashCode()
boolean
newerThan
(TopologyRevision other) static TopologyRevision
parse
(com.couchbase.client.core.deps.com.fasterxml.jackson.databind.node.ObjectNode json) long
rev()
toString()
-
Field Details
-
ZERO
A synthetic revision, older than anything the server could send.(Actually, the server could send a revision with a negative epoch to indicate the epoch is not yet initialized, but we want to ignore those undercooked configs.)
-
-
Constructor Details
-
TopologyRevision
public TopologyRevision(long epoch, long rev) - Parameters:
epoch
- May be negative to indicate the epoch is not yet initialized.rev
- Never negative.
-
-
Method Details
-
parse
public static TopologyRevision parse(com.couchbase.client.core.deps.com.fasterxml.jackson.databind.node.ObjectNode json) -
epoch
public long epoch() -
rev
public long rev() -
compareTo
- Specified by:
compareTo
in interfaceComparable<TopologyRevision>
-
equals
-
toString
-
hashCode
public int hashCode() -
newerThan
-