Class CuratorOperations
java.lang.Object
com.yahoo.vespa.curator.transaction.CuratorOperations
Factory for transactional ZooKeeper operations.
This mirrors the operations which are actually available in Curator, which unfortunately does not include
variants that deletes children, creates parents etc. in a single operation.
- Author:
- Ulf Lilleengen, bratseth
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CuratorOperation
Creates this path with no data.static CuratorOperation
Creates this path with data.static CuratorOperation
Deletes this path.static List<CuratorOperation>
Returns operations deleting this path and everything below it, in an order where a parent is ordered after all its children, such that the operations will succeed when executed in the returned order.static CuratorOperation
Sets data at this path.
-
Constructor Details
-
CuratorOperations
public CuratorOperations()
-
-
Method Details
-
setData
Sets data at this path.- Throws:
IllegalStateException
- in check() if the path does not exist
-
create
Creates this path with data.- Throws:
IllegalStateException
- in check() if the parent does not exist
-
create
Creates this path with no data.- Throws:
IllegalStateException
- in check() if the parent does not exist
-
delete
Deletes this path. This does not delete children.- Throws:
IllegalStateException
- in check() if the path does not exist.
-
deleteAll
Returns operations deleting this path and everything below it, in an order where a parent is ordered after all its children, such that the operations will succeed when executed in the returned order. This does not fail, but returns an empty list if the path does not exist.
-