Class DeleteBuilderImpl
- java.lang.Object
-
- org.apache.curator.framework.imps.DeleteBuilderImpl
-
- All Implemented Interfaces:
Backgroundable<ErrorListenerPathable<java.lang.Void>>,BackgroundPathable<java.lang.Void>,BackgroundVersionable,ChildrenDeletable,DeleteBuilder,DeleteBuilderMain,ErrorListenerPathable<java.lang.Void>,Guaranteeable<ChildrenDeletable>,GuaranteeableDeletable,Pathable<java.lang.Void>,Quietly<DeleteBuilderMain>,Versionable<BackgroundPathable<java.lang.Void>>
public class DeleteBuilderImpl extends java.lang.Object implements DeleteBuilder, ErrorListenerPathable<java.lang.Void>
-
-
Constructor Summary
Constructors Constructor Description DeleteBuilderImpl(CuratorFrameworkImpl client, int version, Backgrounding backgrounding, boolean deletingChildrenIfNeeded, boolean guaranteed, boolean quietly)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BackgroundVersionabledeletingChildrenIfNeeded()Will also delete children if they exist.java.lang.VoidforPath(java.lang.String path)Commit the currently building operation using the given pathprotected intgetVersion()ChildrenDeletableguaranteed()Solves edge cases where an operation may succeed on the server but connection failure occurs before a response can be successfully returned to the client.ErrorListenerPathable<java.lang.Void>inBackground()Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(java.lang.Object context)Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(BackgroundCallback callback)Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(BackgroundCallback callback, java.lang.Object context)Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(BackgroundCallback callback, java.lang.Object context, java.util.concurrent.Executor executor)Perform the action in the backgroundErrorListenerPathable<java.lang.Void>inBackground(BackgroundCallback callback, java.util.concurrent.Executor executor)Perform the action in the backgroundvoidperformBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<java.lang.String> operationAndData)DeleteBuilderMainquietly()Pathable<java.lang.Void>withUnhandledErrorListener(UnhandledErrorListener listener)Set an error listener for this background operation.BackgroundPathable<java.lang.Void>withVersion(int version)Use the given version (the default is -1)
-
-
-
Constructor Detail
-
DeleteBuilderImpl
public DeleteBuilderImpl(CuratorFrameworkImpl client, int version, Backgrounding backgrounding, boolean deletingChildrenIfNeeded, boolean guaranteed, boolean quietly)
-
-
Method Detail
-
quietly
public DeleteBuilderMain quietly()
- Specified by:
quietlyin interfaceQuietly<DeleteBuilderMain>
-
guaranteed
public ChildrenDeletable guaranteed()
Description copied from interface:GuaranteeableSolves edge cases where an operation may succeed on the server but connection failure occurs before a response can be successfully returned to the client.- Specified by:
guaranteedin interfaceGuaranteeable<ChildrenDeletable>- Returns:
- this
- See Also:
GuaranteeableDeletable
-
deletingChildrenIfNeeded
public BackgroundVersionable deletingChildrenIfNeeded()
Description copied from interface:ChildrenDeletableWill also delete children if they exist.
- Specified by:
deletingChildrenIfNeededin interfaceChildrenDeletable- Returns:
-
withVersion
public BackgroundPathable<java.lang.Void> withVersion(int version)
Description copied from interface:VersionableUse the given version (the default is -1)- Specified by:
withVersionin interfaceVersionable<BackgroundPathable<java.lang.Void>>- Parameters:
version- version to use- Returns:
- this
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground(BackgroundCallback callback, java.lang.Object context)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Parameters:
callback- a functor that will get called when the operation has completedcontext- context object - will be available from the event sent to the listener- Returns:
- this
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground(BackgroundCallback callback, java.lang.Object context, java.util.concurrent.Executor executor)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Parameters:
callback- a functor that will get called when the operation has completedcontext- context object - will be available from the event sent to the listenerexecutor- executor to use for the background call- Returns:
- this
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground(BackgroundCallback callback)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Parameters:
callback- a functor that will get called when the operation has completed- Returns:
- this
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground(BackgroundCallback callback, java.util.concurrent.Executor executor)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Parameters:
callback- a functor that will get called when the operation has completedexecutor- executor to use for the background call- Returns:
- this
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground()
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Returns:
- this
-
inBackground
public ErrorListenerPathable<java.lang.Void> inBackground(java.lang.Object context)
Description copied from interface:BackgroundablePerform the action in the background- Specified by:
inBackgroundin interfaceBackgroundable<ErrorListenerPathable<java.lang.Void>>- Parameters:
context- context object - will be available from the event sent to the listener- Returns:
- this
-
withUnhandledErrorListener
public Pathable<java.lang.Void> withUnhandledErrorListener(UnhandledErrorListener listener)
Description copied from interface:ErrorListenerPathableSet an error listener for this background operation. If an exception occurs while processing the call in the background, this listener will be called- Specified by:
withUnhandledErrorListenerin interfaceErrorListenerPathable<java.lang.Void>- Parameters:
listener- the listener- Returns:
- this for chaining
-
performBackgroundOperation
public void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<java.lang.String> operationAndData) throws java.lang.Exception- Throws:
java.lang.Exception
-
forPath
public java.lang.Void forPath(java.lang.String path) throws java.lang.ExceptionDescription copied from interface:PathableCommit the currently building operation using the given path
-
getVersion
protected int getVersion()
-
-