|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.id.uuid.VersionOneGenerator
public final class VersionOneGenerator
Class is responsible for generating version 1 UUID's per RFC 4122. This class attempts to locate the machine's node identifier first by attempting to loading the properties file UUID.properties from the system classpath. If the UUID.properties file does not exist then the generator will create a node identifier from random information as defined in the RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace.
Field Summary |
---|
Method Summary | |
---|---|
static VersionOneGenerator |
getInstance()
Returns the singleton instance of the version one UUID generator. |
java.lang.Object |
nextIdentifier()
Gets the next identifier in the sequence. |
UUID |
nextUUID()
Returns a new version 1 UUID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static VersionOneGenerator getInstance()
Returns the singleton instance of the version one UUID generator.
public java.lang.Object nextIdentifier()
IdentifierGenerator
nextIdentifier
in interface IdentifierGenerator
IdentifierGenerator.nextIdentifier()
public UUID nextUUID()
Returns a new version 1 UUID. The method acts upons static variables and so should be sychronized.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |