文档章节

UUID

rckv
 rckv
发布于 2015/11/16 22:39
字数 255
阅读 72
收藏 0

RFC 4122

UUID (universally unique identifier) are guaranteed to be unique across time and space.

A UUID is 128 bit long, and consists of a 60-bit time value, a 16-bit sequence number and a 48-bit node identifier.

The time value is taken from the system clock, and is monotonically incrementing. However, since it is possible to set the system clock backward, a sequence number is added. The sequence number is incremented each time the UUID generator is started. The combination guarantees that identifiers created on the same machine are unique with a high degree of probability.

Note that due to the structure of the UUID and the use of sequence number, there is no guarantee that UUID values themselves are monotonically incrementing. The UUID value cannot itself be used to sort based on order of creation.

To guarantee that UUIDs are unique across all machines in the network, the IEEE 802 MAC address of the machine's network interface card is used as the node identifier.

The MAC address is used to generate identifiers that are unique to your machine, preventing conflicts in distributed applications. The MAC address is six bytes (48 bit) long. It is automatically extracted from one of the network cards on your machine.

The sequence number is incremented each time the UUID generator is first used by the application, to prevent multiple processes from generating the same set of identifiers, and deal with changes to the system clock.

本文转载自:https://github.com/assaf/uuid

上一篇: onbeforeunload
下一篇: onbeforeunload
rckv
粉丝 0
博文 2
码字总数 10
作品 0
深圳
程序员
私信 提问
汇总各种Android 蓝牙各种UUID

汇总各种Android 蓝牙各种UUID ServiceDiscoveryServerServiceClassIDUUID = '{00001000-0000-1000-8000-00805F9B34FB}' BrowseGroupDescriptorServiceClassIDUUID = '{00001001-0000-1000-8......

vga
2015/09/17
125
0
手机开发各类服务对应的UUID

手机开发各类服务对应的UUID ServiceDiscoveryServerServiceClassID_UUID: TGUID = '{00001000-0000-1000-8000-00805F9B34FB}'; BrowseGroupDescriptorServiceClassID_UUID: TGUID = '{00001......

LiangX
2012/02/19
168
0
Pgsql 使用UUID做主键

数据库生成主键的几种策略(前言) 这里可以参考:基于按annotation的hibernate主键生成策略 使用UUID做主键 两种方式: 使用Hibernate 提供的Type 方式(建议方式) 使用Converter (自定义属性转...

OrangeJoke
2016/09/18
468
0
Spring-Cloud | openfeign使用细节

写在前面的话 各位,下午好! 我比较喜欢用 fegin 来实现微服务之间的调用,但是feign使用的那些细节,是get到了吗?本节我将使用Spring Boot 2.0.5.RELEASE + Spring Cloud SR1 + openfeig...

冯文议
2018/09/15
470
0
linux下安装使用libuuid

UUID简介 UUID含义是通用唯一识别码(Universally Unique Identifier),这 是一个软件建构的标准,也是被开源软件基金会 (Open Software Foundation, OSF) 的组织应用在分布式计算环境 (Distr...

t146lla128xx0x
2017/12/12
0
0

没有更多内容

加载失败,请刷新页面

加载更多

CQRS与AXON

CQRS 看了蛮多文章,只会CRUD,却不懂CQRS,CQRS是遵循DDD思想而产生的一种模式,Command and Query Responsibility Segregation 命令与查询隔离。查询就直接通过正常的模式service调dao层。...

无极之岚
29分钟前
4
0
OSChina 周三乱弹 —— 欢迎你来做产品经理

Osc乱弹歌单(2019)请戳(这里) 【今日歌曲】 @巴拉迪维 :10多次劲歌金曲获奖,更多叱咤歌坛排名,黎明才应该是四大天王之首,只可惜拍的电影太少。单曲循环一个多月的歌,力荐 《无名份的...

小小编辑
44分钟前
78
5
500行代码,教你用python写个微信飞机大战

这几天在重温微信小游戏的飞机大战,玩着玩着就在思考人生了,这飞机大战怎么就可以做的那么好,操作简单,简单上手。 帮助蹲厕族、YP族、饭圈女孩在无聊之余可以有一样东西让他们振作起来!...

上海小胖
今天
8
0
关于AsyncTask的onPostExcute方法是否会在Activity重建过程中调用的问题

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 本文链接:https://blog.csdn.net/XG1057415595/article/details/86774575 假设下面一种情况...

shzwork
今天
7
0
object 类中有哪些方法?

getClass(): 获取运行时类的对象 equals():判断其他对象是否与此对象相等 hashcode():返回该对象的哈希码值 toString():返回该对象的字符串表示 clone(): 创建并返此对象的一个副本 wait...

happywe
今天
6
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部