Package org.bson.types
Class BSONTimestamp
- java.lang.Object
-
- org.bson.types.BSONTimestamp
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BSONTimestamp>
@Deprecated(since="2022-10-31") public final class BSONTimestamp extends java.lang.Object implements java.lang.Comparable<BSONTimestamp>, java.io.Serializable
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.This is used for internal increment values. For normal dates you should use java.util.Date time is seconds since epoch inc is an ordinal.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BSONTimestamp()Deprecated.Creates a new instance.BSONTimestamp(int time, int increment)Deprecated.Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(BSONTimestamp ts)Deprecated.booleanequals(java.lang.Object obj)Deprecated.intgetInc()Deprecated.Gets the incrementing ordinal for operations within a given second.intgetTime()Deprecated.Gets the time in seconds since epochinthashCode()Deprecated.java.lang.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
BSONTimestamp
public BSONTimestamp()
Deprecated.Creates a new instance.
-
BSONTimestamp
public BSONTimestamp(int time, int increment)Deprecated.Creates a new instance.- Parameters:
time- the time in seconds since epochincrement- an incrementing ordinal for operations within a given second
-
-
Method Detail
-
getTime
public int getTime()
Deprecated.Gets the time in seconds since epoch- Returns:
- an int representing time in seconds since epoch
-
getInc
public int getInc()
Deprecated.Gets the incrementing ordinal for operations within a given second.- Returns:
- the increment ordinal
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(BSONTimestamp ts)
Deprecated.- Specified by:
compareToin interfacejava.lang.Comparable<BSONTimestamp>
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
equalsin classjava.lang.Object
-
-