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, boolean useParentCreation) 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 useParentCreation - if true, call CreateBuilder.creatingParentContainersIfNeeded()
PersistentNodes must be started:
node.start();
When you are through with the PersistentNode instance, you should call close:
node.close();
NOTE: this will delete the node
PersistentNode instances internally handle all error states recreating the node as necessary.