Class BSONTimestamp

    • Constructor Detail

      • BSONTimestamp

        public BSONTimestamp​()
        Creates a new instance.
      • BSONTimestamp

        public BSONTimestamp​(int time,
                             int increment)
        Creates a new instance.
        Parameters:
        time - the time in seconds since epoch
        increment - an incrementing ordinal for operations within a given second
        MongoDB documentation
        Timestamps
    • Method Detail

      • getTime

        public int getTime​()
        Gets the time in seconds since epoch
        Returns:
        an int representing time in seconds since epoch
      • getInc

        public int getInc​()
        Gets the incrementing ordinal for operations within a given second.
        Returns:
        the increment ordinal
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class Object