标签:path delete and nic persist 作用 create append The
CreateMode 该类的作用是如何在zookeeper中创建节点!
/** * The znode will not be automatically deleted upon client‘s disconnect. */ PERSISTENT (0, false, false),
客户端断开连接的时候,不会自动删除节点
/** * The znode will not be automatically deleted upon client‘s disconnect, * and its name will be appended with a monotonically increasing number. */ PERSISTENT_SEQUENTIAL (2, false, true)
客户端断开连接的时候,不会自动删除节点,并且会将节点名拼接一个自增值,例如:创建节点时path输入的是test,当客户端退出时path将变成test0000000001,该值(0000000001)会自动增长!
/** * The znode will be deleted upon the client‘s disconnect. */ EPHEMERAL (1, true, false)
客户端断开连接的时候,将会自定删除节点
/** * The znode will be deleted upon the client‘s disconnect, and its name * will be appended with a monotonically increasing number. */ EPHEMERAL_SEQUENTIAL (3, true, true);
客户端断开连接的时候,将会自定删除几点,并且将节点名拼接一个自增值(同上)
标签:path delete and nic persist 作用 create append The
原文地址:https://www.cnblogs.com/shiguotao-com/p/9368672.html