public class BSONTimestamp extends Object implements Serializable
构造器和说明 |
---|
BSONTimestamp()
Construct an empty BSONTimestamp.
|
BSONTimestamp(Date date)
Construct BSONTimestamp by java.util.Date.
|
BSONTimestamp(int time,
int inc)
Construct BSONTimestamp.
|
BSONTimestamp(Timestamp timestamp)
Construct BSONTimestamp by java.sql.Timestamp.
|
public BSONTimestamp()
public BSONTimestamp(Date date)
public BSONTimestamp(int time, int inc)
time
- seconds since epoch.inc
- microseconds in range of [0us, 999999us], while the 'inc' is out of range,
the carry will occur.public BSONTimestamp(Timestamp timestamp)
public Date getDate()
public int getInc()
public int getTime()
public Date toDate()
public Timestamp toTimestamp()
Copyright © 2018. All rights reserved.