Package com.couchbase.client.core.config
Class ConfigVersion
java.lang.Object
com.couchbase.client.core.config.ConfigVersion
- All Implemented Interfaces:
Comparable<ConfigVersion>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ConfigVersion
A synthetic version, older than anything the server could send. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
long
epoch()
boolean
int
hashCode()
boolean
isLessThanOrEqualTo
(ConfigVersion other) long
rev()
toString()
-
Field Details
-
ZERO
A synthetic version, older than anything the server could send.(Actually, the server could send a version with a negative epoch to indicate the epoch is not yet initialized, but we want to ignore those undercooked configs.)
-
-
Constructor Details
-
ConfigVersion
public ConfigVersion(long epoch, long rev) - Parameters:
epoch
- Major version. May be negative to indicate the epoch is not yet initialized. May be zero to indicate the server is too old to know about epochs.rev
- Minor version. All rev values returned by the server are positive.
-
-
Method Details
-
epoch
public long epoch() -
rev
public long rev() -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<ConfigVersion>
-
isLessThanOrEqualTo
-
equals
-
hashCode
public int hashCode()
-