@Stability.Internal public class ConfigVersion extends Object implements Comparable<ConfigVersion>
Modifier and Type | Field and Description |
---|---|
static ConfigVersion |
ZERO
A synthetic version, older than anything the server could send.
|
Constructor and Description |
---|
ConfigVersion(long epoch,
long rev) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ConfigVersion o) |
long |
epoch() |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isLessThanOrEqualTo(ConfigVersion other) |
long |
rev() |
String |
toString() |
public static final ConfigVersion ZERO
(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.)
public ConfigVersion(long epoch, long rev)
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.public long epoch()
public long rev()
public int compareTo(@NonNull ConfigVersion o)
compareTo
in interface Comparable<ConfigVersion>
public boolean isLessThanOrEqualTo(ConfigVersion other)
Copyright © 2024 Couchbase, Inc.. All rights reserved.