Package org.bson
Class BsonTimestamp
- java.lang.Object
-
- org.bson.BsonValue
-
- org.bson.BsonTimestamp
-
- All Implemented Interfaces:
java.lang.Comparable<BsonTimestamp>
@Deprecated(since="2022-10-31") public final class BsonTimestamp extends BsonValue implements java.lang.Comparable<BsonTimestamp>
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.A value representing the BSON timestamp type.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description BsonTimestamp()
Deprecated.Construct a new instance with a null time and a 0 increment.BsonTimestamp(int seconds, int increment)
Deprecated.Construct a new instance for the given time and increment.BsonTimestamp(long value)
Deprecated.Construct a new instance for the given value, which combines the time in seconds and the increment as a single long value.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
compareTo(BsonTimestamp ts)
Deprecated.boolean
equals(java.lang.Object o)
Deprecated.BsonType
getBsonType()
Deprecated.Gets the BSON type of this value.int
getInc()
Deprecated.Gets the increment value.int
getTime()
Deprecated.Gets the time in seconds since epoch.long
getValue()
Deprecated.Gets the value of the timestamp.int
hashCode()
Deprecated.java.lang.String
toString()
Deprecated.-
Methods inherited from class org.bson.BsonValue
asArray, asBinary, asBoolean, asDateTime, asDBPointer, asDecimal128, asDocument, asDouble, asInt32, asInt64, asJavaScript, asJavaScriptWithScope, asNumber, asObjectId, asRegularExpression, asString, asSymbol, asTimestamp, isArray, isBinary, isBoolean, isDateTime, isDBPointer, isDecimal128, isDocument, isDouble, isInt32, isInt64, isJavaScript, isJavaScriptWithScope, isNull, isNumber, isObjectId, isRegularExpression, isString, isSymbol, isTimestamp
-
-
-
-
Constructor Detail
-
BsonTimestamp
public BsonTimestamp()
Deprecated.Construct a new instance with a null time and a 0 increment.
-
BsonTimestamp
public BsonTimestamp(long value)
Deprecated.Construct a new instance for the given value, which combines the time in seconds and the increment as a single long value.- Parameters:
value
- the timetamp as a single long value- Since:
- 3.5
-
BsonTimestamp
public BsonTimestamp(int seconds, int increment)
Deprecated.Construct a new instance for the given time and increment.- Parameters:
seconds
- the number of seconds since the epochincrement
- the increment.
-
-
Method Detail
-
getBsonType
public BsonType getBsonType()
Deprecated.Description copied from class:BsonValue
Gets the BSON type of this value.- Specified by:
getBsonType
in classBsonValue
- Returns:
- the BSON type, which may not be null (but may be BSONType.NULL)
-
getValue
public long getValue()
Deprecated.Gets the value of the timestamp.- Returns:
- the timestamp value
- Since:
- 3.5
-
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 increment value.- Returns:
- an incrementing ordinal for operations within a given second
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(BsonTimestamp ts)
Deprecated.- Specified by:
compareTo
in interfacejava.lang.Comparable<BsonTimestamp>
-
equals
public boolean equals(java.lang.Object o)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
-