Class DeleteBuilderImpl
java.lang.Object
org.apache.curator.framework.imps.DeleteBuilderImpl
- All Implemented Interfaces:
Backgroundable<ErrorListenerPathable<Void>>
,BackgroundPathable<Void>
,BackgroundVersionable
,ChildrenDeletable
,DeleteBuilder
,DeleteBuilderMain
,ErrorListenerPathable<Void>
,Guaranteeable<ChildrenDeletable>
,GuaranteeableDeletable
,Idempotentable<DeleteBuilderMain>
,Pathable<Void>
,Quietly<DeleteBuilderMain>
,Versionable<BackgroundPathable<Void>>
-
Constructor Summary
ConstructorDescriptionDeleteBuilderImpl
(CuratorFrameworkImpl client, int version, Backgrounding backgrounding, boolean deletingChildrenIfNeeded, boolean guaranteed, boolean quietly) -
Method Summary
Modifier and TypeMethodDescriptionWill also delete children if they exist.Commit the currently building operation using the given pathprotected int
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.If the first try of this operation gets a transient error, curator will retry the operation, and treat it as successful so long as the end state of the znode is the same as if the operation had completed without error on the first try.Perform the action in the backgroundinBackground
(Object context) Perform the action in the backgroundinBackground
(BackgroundCallback callback) Perform the action in the backgroundinBackground
(BackgroundCallback callback, Object context) Perform the action in the backgroundinBackground
(BackgroundCallback callback, Object context, Executor executor) Perform the action in the backgroundinBackground
(BackgroundCallback callback, Executor executor) Perform the action in the backgroundvoid
performBackgroundOperation
(org.apache.curator.framework.imps.OperationAndData<String> operationAndData) quietly()
Set an error listener for this background operation.withVersion
(int version) Use the given version (the default is -1)
-
Constructor Details
-
DeleteBuilderImpl
public DeleteBuilderImpl(CuratorFrameworkImpl client, int version, Backgrounding backgrounding, boolean deletingChildrenIfNeeded, boolean guaranteed, boolean quietly)
-
-
Method Details
-
quietly
- Specified by:
quietly
in interfaceQuietly<DeleteBuilderMain>
-
idempotent
Description copied from interface:Idempotentable
If the first try of this operation gets a transient error, curator will retry the operation, and treat it as successful so long as the end state of the znode is the same as if the operation had completed without error on the first try.- Specified by:
idempotent
in interfaceIdempotentable<DeleteBuilderMain>
- Returns:
- this:
-
guaranteed
Description copied from interface:Guaranteeable
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.- Specified by:
guaranteed
in interfaceGuaranteeable<ChildrenDeletable>
- Returns:
- this
- See Also:
-
deletingChildrenIfNeeded
Description copied from interface:ChildrenDeletable
Will also delete children if they exist.
- Specified by:
deletingChildrenIfNeeded
in interfaceChildrenDeletable
- Returns:
-
withVersion
Description copied from interface:Versionable
Use the given version (the default is -1)- Specified by:
withVersion
in interfaceVersionable<BackgroundPathable<Void>>
- Parameters:
version
- version to use- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<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<Void> inBackground(BackgroundCallback callback, Object context, Executor executor) Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<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
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<Void>>
- Parameters:
callback
- a functor that will get called when the operation has completed- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<Void>>
- Parameters:
callback
- a functor that will get called when the operation has completedexecutor
- executor to use for the background call- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<Void>>
- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerPathable<Void>>
- Parameters:
context
- context object - will be available from the event sent to the listener- Returns:
- this
-
withUnhandledErrorListener
Description copied from interface:ErrorListenerPathable
Set 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:
withUnhandledErrorListener
in interfaceErrorListenerPathable<Void>
- Parameters:
listener
- the listener- Returns:
- this for chaining
-
getBackgroundEventType
-
performBackgroundOperation
public void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<String> operationAndData) throws Exception - Throws:
Exception
-
forPath
Description copied from interface:Pathable
Commit the currently building operation using the given path -
getVersion
protected int getVersion()
-