Serializable
, Comparable<BSONTimestamp>
public final class BSONTimestamp extends Object implements Comparable<BSONTimestamp>, Serializable
Constructor | Description |
---|---|
BSONTimestamp() |
Creates a new instance.
|
BSONTimestamp(int time,
int increment) |
Creates a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
int |
compareTo(BSONTimestamp ts) |
|
boolean |
equals(Object obj) |
|
int |
getInc() |
Gets the incrementing ordinal for operations within a given second.
|
int |
getTime() |
Gets the time in seconds since epoch
|
int |
hashCode() |
|
String |
toString() |
public BSONTimestamp()
public BSONTimestamp(int time, int increment)
time
- the time in seconds since epochincrement
- an incrementing ordinal for operations within a given secondpublic int getTime()
public int getInc()
public int compareTo(BSONTimestamp ts)
compareTo
in interface Comparable<BSONTimestamp>