A UUID (or GUID) is a unique identifier that can be created whithout a central authority. UUIDs can be used if a sequence number is not good enough. This implementation is thread safe and very fast.
UUID generates version 1 UUIDs that contain the the MAC address of a network card. To obtain it, the following commands are invoked and their respective output parsed:
What is it used for?
UUIDs are applied for identification purposes in a number of fields in the computer industry.
Possible uses are (but are not limited to):
- The identifiers in the windows registry.
- Identifiers used in databases.
- Identifiers used in RPC (COM, CORBA) (remote procedure calls)
What does it look like?
The formal definition of the UUID string representation is provided by the following :
UUIDs are basically 128 bit numbers, normally presented in the following hexadecimal - grouped form:
58e0a7d7-eebc-11d8-9669-0800200c9a66
UUID = time-low "-" time-mid "-" time-high-and-version "-" clock-seq-and-reserved clock-seq-low "-" nodeIn Microsoft Windows, run--> CMD--> ipconfig /all
time-low = 4hexOctet
time-mid = 2hexOctet
time-high-and-version = 2hexOctet
clock-seq-and-reserved = hexOctet
clock-seq-low = hexOctet
node = 6hexOctet
hexOctet = hexDigit hexDigit
hexDigit = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / "a" / "b" / "c" / "d" / "e" / "f" / "A" / "B" / "C" / "D" / "E" / "F"
Resources
- Java UUID Generator
- RFC 4122 - A Universally Unique IDentifier (UUID) URN Namespace
- ITU-T Rec. X.667
- ISO/IEC 11578:1996
- Generate UUIDs (or GUIDs) in Java
- java.util.UUID, available since JDK 5.
- UUID Generators Apache Commons (http://commons.apache.org/sandbox/)
0 comments:
Post a Comment