Package org.apache.curator.framework
Class EnsureContainers
- java.lang.Object
-
- org.apache.curator.framework.EnsureContainers
-
public class EnsureContainers extends java.lang.ObjectSimilar toEnsurePathbut creates containers.
-
-
Constructor Summary
Constructors Constructor Description EnsureContainers(CuratorFramework client, java.lang.String path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidensure()The first time this method is called, all nodes in the path will be created as containers if neededvoidreset()Reset so that the next call toensure()will attempt to create containers
-
-
-
Constructor Detail
-
EnsureContainers
public EnsureContainers(CuratorFramework client, java.lang.String path)
- Parameters:
client- the clientpath- path to ensure is containers
-
-
Method Detail
-
ensure
public void ensure() throws java.lang.ExceptionThe first time this method is called, all nodes in the path will be created as containers if needed- Throws:
java.lang.Exception- errors
-
reset
public void reset()
Reset so that the next call toensure()will attempt to create containers
-
-