Class BSONTimestamp

java.lang.Object
org.bson.types.BSONTimestamp
All Implemented Interfaces:
Serializable, Comparable<BSONTimestamp>

@Deprecated(since="2022-10-31") public final class BSONTimestamp extends Object implements Comparable<BSONTimestamp>, 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:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Creates a new instance.
    BSONTimestamp(int time, int increment)
    Deprecated.
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated.
     
    boolean
    Deprecated.
     
    int
    Deprecated.
    Gets the incrementing ordinal for operations within a given second.
    int
    Deprecated.
    Gets the time in seconds since epoch
    int
    Deprecated.
     
    Deprecated.
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • 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 epoch
      increment - an incrementing ordinal for operations within a given second
  • Method Details

    • 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 String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(BSONTimestamp ts)
      Deprecated.
      Specified by:
      compareTo in interface Comparable<BSONTimestamp>
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Deprecated.
      Overrides:
      equals in class Object