跳过导航链接
org.bson.types

类 BSONTimestamp

    • 构造器详细资料

      • BSONTimestamp

        public BSONTimestamp()
        Construct an empty BSONTimestamp.
      • BSONTimestamp

        public BSONTimestamp(Date date)
        Construct BSONTimestamp by java.util.Date.
      • BSONTimestamp

        public BSONTimestamp(int time,
                             int inc)
        Construct BSONTimestamp.
        参数:
        time - seconds since epoch.
        inc - microseconds in range of [0us, 999999us], while the 'inc' is out of range, the carry will occur.
      • BSONTimestamp

        public BSONTimestamp(Timestamp timestamp)
        Construct BSONTimestamp by java.sql.Timestamp. The precision of BSONTimestamp is microsecond and Timestamp is nanosecond, so there may have a loss of nanoseconds.
    • 方法详细资料

      • getDate

        public Date getDate()
        返回:
        get time in seconds since epoch
      • getInc

        public int getInc()
        返回:
        get time in microseconds since epoch
      • getTime

        public int getTime()
        返回:
        get time in seconds since epoch
      • toDate

        public Date toDate()
        返回:
        Date of time and inc in milliseconds since epoch.
      • toTimestamp

        public Timestamp toTimestamp()
        返回:
        Timestamp of time in milliseconds and inc in nanoseconds since epoch

Copyright © 2018. All rights reserved.