A persistent node is a node that attempts to stay present in ZooKeeper, even through connection and session interruptions.
public PersistentNode(CuratorFramework client, CreateMode mode, boolean useProtection, String basePath, byte data) Parameters: client - client instance mode - creation mode useProtection - if true, call CreateBuilder.withProtection() basePath - the base path for the node data - data for the node
PersistentNodes must be started:
When you are through with the PersistentNode instance, you should call close:
NOTE: this will delete the node
PersistentNode instances internally handle all error states recreating the node as necessary.