|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.core.id.UUIDFactory
public class UUIDFactory
This class is a factory for generating universally unique identifiers (UUID's).
UUIDs are output in the following 36-character format:
xxxxxxxx-yyyy-zzzz-cccc-nnnnnnnnnnnnwhere x=least significant time component, y=middle significant time component, z=most significant time component multiplexed with version, c=clock sequence multiplexed with variant, and n=node component (random number).
The generated ID's conform somewhat to the (now expired) IETF internet draft standard, "UUIDs and GUIDs", DCE spec on UUIDs.
All references in this code to bit positions as "least significant" and "most significant" refer to the bits moving from right to left, respectively.
Constructor Summary | |
---|---|
UUIDFactory()
|
Method Summary | |
---|---|
ObjectID |
create()
Create a new ObjectID instance using this protocol. |
java.lang.String |
getDescription()
Return the description for the type of ObjectID described by this object. |
java.lang.String |
getProtocol()
Return the name of the protocol that this factory uses. |
ObjectID |
stringToObject(java.lang.String value)
Attempt to convert the specified string to the appropriate ObjectID instance. |
ObjectID |
stringWithoutProtocolToObject(java.lang.String value)
Attempt to convert the specified string to the appropriate ObjectID instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UUIDFactory()
Method Detail |
---|
public java.lang.String getDescription()
getDescription
in interface ObjectIDFactory
public ObjectID stringWithoutProtocolToObject(java.lang.String value) throws InvalidIDException
IDGenerator.stringToObject(String)
method, which
must process the protocol to determine the correct parser to use. As such, it guarantees
that the parser that receives this call can assume that the protocol was equal to the
protocol returned by the parser's ObjectIDDescriptor#getProtocol()
.
stringWithoutProtocolToObject
in interface ObjectIDFactory
value
- the stringified id with the protocol and ObjectID.DELIMITER already
removed, and should never null or zero length
InvalidIDException
- if the parser is aware of this protocol, but it is of the wrong
format for this type of ObjectID.public ObjectID stringToObject(java.lang.String value) throws InvalidIDException
stringToObject
in interface ObjectIDFactory
value
- the stringified id (the result of ObjectID.toString()
),
and should never null or zero length
InvalidIDException
- if the parser is aware of this protocol, but it is of the wrong
format for this type of ObjectID.public java.lang.String getProtocol()
getProtocol
in interface ObjectIDFactory
public ObjectID create()
Create a new ObjectID instance using this protocol.
create
in interface ObjectIDFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |