Class TopologyRevision
java.lang.Object
com.couchbase.client.core.topology.TopologyRevision
- All Implemented Interfaces:
Comparable<TopologyRevision>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TopologyRevisionA synthetic revision, older than anything the server could send. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlongepoch()booleaninthashCode()booleannewerThan(TopologyRevision other) static TopologyRevisionparse(com.couchbase.client.core.deps.com.fasterxml.jackson.databind.node.ObjectNode json) longrev()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:
compareToin interfaceComparable<TopologyRevision>
-
equals
-
toString
-
hashCode
public int hashCode() -
newerThan
-