节点类型
/**
* The znode will not be automatically deleted upon client's disconnect.
* 客户端关闭后znode才会删除
*/
PERSISTENT(0, false, false, false, false),
/**
* znode的名字添加一个单调递增的数字
* 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, false, false),
/**
* The znode will be deleted upon the client's disconnect.
*/
EPHEMERAL(1, true, false, false, 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, false, false),
思考:
SEQUENTIAL是如何实现的?是否能够连续递增