Public Member Functions | |
| ObjectId (Date time) | |
| ObjectId (Date time, int inc) | |
| ObjectId (Date time, int machine, int inc) | |
| ObjectId (String s) | |
| ObjectId (String s, boolean babble) | |
| ObjectId (byte[] b) | |
| ObjectId (int time, int machine, int inc) | |
| ObjectId () | |
| int | hashCode () |
| boolean | equals (Object o) |
| String | toStringBabble () |
| String | toStringMongod () |
| byte[] | toByteArray () |
| String | toString () |
| int | compareTo (ObjectId id) |
| int | getMachine () |
| long | getTime () |
| int | getTimeSecond () |
| int | getInc () |
| int | _time () |
| int | _machine () |
| int | _inc () |
| boolean | isNew () |
| void | notNew () |
Static Public Member Functions | |
| static ObjectId | get () |
| static boolean | isValid (String s) |
| static ObjectId | massageToObjectId (Object o) |
| static String | babbleToMongod (String b) |
| static int | getGenMachineId () |
| static int | getCurrentInc () |
| static int | _flip (int x) |
A globally unique identifier for objects.
Consists of 12 bytes, divided as follows:
0 1 2 3 4 5 6 7 8 9 10 11 time machine pid inc
objectids
|
inline |
Creates a new instance from a string.
| s | the string to convert |
| IllegalArgumentException | if the string is not a valid id |
|
inline |
Creates an ObjectId
| time | time in seconds |
| machine | machine ID |
| inc | incremental value |
|
inline |
Create a new object id.
|
inlinestatic |
Gets a new object id.
|
inlinestatic |
Gets the current value of the auto increment
|
inlinestatic |
Gets the generated machine ID, identifying the machine / process / class loader
|
inline |
Gets the time of this ID, in milliseconds
|
inline |
Gets the time of this ID, in seconds
|
inlinestatic |
Checks if a string could be an ObjectId.
|
inlinestatic |
1.8.2