public class BSONTimestamp extends Object implements Comparable<BSONTimestamp>, Serializable
time
is seconds
since epoch inc
is an ordinal.Constructor and Description |
---|
BSONTimestamp()
Construct a new instance with a null time and a 0 increment.
|
BSONTimestamp(int time,
int inc)
Construct a new instance for the given time and increment.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BSONTimestamp ts) |
boolean |
equals(Object obj) |
int |
getInc()
Gets the increment value.
|
int |
getTime()
Gets the time in seconds since epoch.
|
int |
hashCode() |
String |
toString() |
public BSONTimestamp()
public BSONTimestamp(int time, int inc)
time
- the number of seconds since the epochinc
- the increment.public int getTime()
public int getInc()
public int compareTo(BSONTimestamp ts)
compareTo
in interface Comparable<BSONTimestamp>
Copyright © 2023. All rights reserved.