UUID详解

源码分析: link. 名词解释: link源码中注释 **A class that represents an immutable universally unique identifier (UUID). A UUID re

源码分析: link.
名词解释: link

源码中注释

/**
A class that represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.
There exist different variants of these global identifiers. The methods of this class are for manipulating the Leach-Salz variant, although the constructors allow the creation of any variant of UUID (described below).
The layout of a variant 2 (Leach-Salz) UUID is as follows: The most significant long consists of the following unsigned fields:
   0xFFFFFFFF00000000 time_low
   0x00000000FFFF0000 time_mid
   0x000000000000F000 version
   0x0000000000000FFF time_hi
   
The least significant long consists of the following unsigned fields:
   0xC000000000000000 variant
   0x3FFF000000000000 clock_seq
   0x0000FFFFFFFFFFFF node
   
The variant field contains a value which identifies the layout of the UUID. The bit layout described above is valid only for a UUID with a variant value of 2, which indicates the Leach-Salz variant.
The version field holds a value that describes the type of this UUID. There are four different basic types of UUIDs: time-based, DCE security, name-based, and randomly generated UUIDs. These types have a version value of 1, 2, 3 and 4, respectively.
For more information including algorithms used to create UUIDs, see RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace, section 4.2 "Algorithms for Creating a Time-Based UUID".
Since:
1.5
*/

发布者:admin,转转请注明出处:http://www.yc00.com/web/1754939639a5217914.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信