-
在locks节点下创建临时顺序节点node_n
-
判断当前创建的节点是否为locks节点下所有子节点中最小的子节点
-
是则获取锁,进行业务处理,否则将节点从小到大排序,监听当前节点上一个节点的删除事件
-
事件触发后回到步骤2进行判断,直至拿到锁
-
Notifications
You must be signed in to change notification settings - Fork 1
One-One-Code/ZooKeeper-
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
C#基于ZooKeeper分布式锁
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published