public final class GUID
extends java.lang.Object
implements java.lang.Cloneable, java.lang.Comparable, java.io.Serializable
1) The time on any machine is never set back.
2) Each machine has a unique IP address.
3) Each process has the 'org.apache.ode.uid.port' property set to the
same non-zero value.
byte: 0 1 2 3 4 5 6 7 8 9 10 11 12 13
[ IPADDRESS ] [ START TIME IN MS ] [ count]
This format allow more compact string representation.
Persistence mechanism maps 6 bits to a number-char mapping. Byte
0-5 (48 bits, 6 bits per char => 8 chars)
Since the current time typically has zeros for many of its most significant
digits, all leading zeros are truncated from the string representation.
The following 6 bit to char mapping is used:
0-9 -> 0-9
10-35 -> A-Z
36-60 -> a-y
61 -> za
62 -> zb
63 -> zc
| Modifier and Type | Class and Description |
|---|---|
static class |
GUID.MalformedGuidException |
| Constructor and Description |
|---|
GUID()
Create a new unique GUID
|
GUID(java.lang.String str)
Reconstitute a GUID from it's string representation
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o) |
boolean |
equals(java.lang.Object o) |
byte[] |
getGuid()
Get the GUID bytes.
|
static GUID |
getVMGUID() |
int |
hashCode() |
static void |
main(java.lang.String[] argv) |
static java.lang.String |
makeGUID(java.lang.String digest) |
java.lang.String |
toString()
Convert a GUID to it's string representation.
|
public GUID()
public GUID(java.lang.String str)
throws GUID.MalformedGuidException
str - DOCUMENTMEGUID.MalformedGuidException - DOCUMENTMEpublic byte[] getGuid()
public static GUID getVMGUID()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static void main(java.lang.String[] argv)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic static java.lang.String makeGUID(java.lang.String digest)