|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.lib.util.UUIDGenerator
public class UUIDGenerator
UUID value generator. Type 1 generator is based on the time-based generator
in the Apache Commons Id project: http://jakarta.apache.org/commons/sandbox
/id/uuid.html The type 4 generator uses the standard Java UUID generator.
The type 1 code has been vastly simplified and modified to replace the
ethernet address of the host machine with the IP, since we do not want to
require native libs and Java cannot access the MAC address directly.
In spirit, implements the IETF UUID draft specification, found here:
http://www1.ics.uci.edu/~ejw/authoring/uuid-guid/draft-leach-uuids-guids-01
.txt
Field Summary | |
---|---|
static int |
TYPE1
|
static int |
TYPE4
|
Constructor Summary | |
---|---|
UUIDGenerator()
|
Method Summary | |
---|---|
static byte[] |
createType1()
|
(package private) static long |
getTime()
Get the timestamp to be used for this uuid. |
static byte[] |
next(int type)
Return a unique UUID value. |
static String |
nextHex(int type)
Return the next unique uuid value as a 32-character hex string. |
static String |
nextString(int type)
Return the next unique uuid value as a 16-character string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE1
public static final int TYPE4
Constructor Detail |
---|
public UUIDGenerator()
Method Detail |
---|
public static byte[] next(int type)
public static byte[] createType1()
public static String nextString(int type)
public static String nextHex(int type)
static long getTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |