public class DeleteBuilderImpl extends Object implements DeleteBuilder, ErrorListenerPathable<Void>
Constructor and Description |
---|
DeleteBuilderImpl(CuratorFrameworkImpl client,
int version,
Backgrounding backgrounding,
boolean deletingChildrenIfNeeded,
boolean guaranteed,
boolean quietly) |
Modifier and Type | Method and Description |
---|---|
BackgroundVersionable |
deletingChildrenIfNeeded()
Will also delete children if they exist.
|
Void |
forPath(String path)
Commit the currently building operation using the given path
|
protected int |
getVersion() |
ChildrenDeletable |
guaranteed()
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.
|
DeleteBuilderMain |
idempotent()
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.
|
ErrorListenerPathable<Void> |
inBackground()
Perform the action in the background
|
ErrorListenerPathable<Void> |
inBackground(BackgroundCallback callback)
Perform the action in the background
|
ErrorListenerPathable<Void> |
inBackground(BackgroundCallback callback,
Executor executor)
Perform the action in the background
|
ErrorListenerPathable<Void> |
inBackground(BackgroundCallback callback,
Object context)
Perform the action in the background
|
ErrorListenerPathable<Void> |
inBackground(BackgroundCallback callback,
Object context,
Executor executor)
Perform the action in the background
|
ErrorListenerPathable<Void> |
inBackground(Object context)
Perform the action in the background
|
void |
performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<String> operationAndData) |
DeleteBuilderMain |
quietly() |
Pathable<Void> |
withUnhandledErrorListener(UnhandledErrorListener listener)
Set an error listener for this background operation.
|
BackgroundPathable<Void> |
withVersion(int version)
Use the given version (the default is -1)
|
public DeleteBuilderImpl(CuratorFrameworkImpl client, int version, Backgrounding backgrounding, boolean deletingChildrenIfNeeded, boolean guaranteed, boolean quietly)
public DeleteBuilderMain quietly()
quietly
in interface Quietly<DeleteBuilderMain>
public DeleteBuilderMain idempotent()
Idempotentable
idempotent
in interface Idempotentable<DeleteBuilderMain>
public ChildrenDeletable guaranteed()
Guaranteeable
guaranteed
in interface Guaranteeable<ChildrenDeletable>
GuaranteeableDeletable
public BackgroundVersionable deletingChildrenIfNeeded()
ChildrenDeletable
Will also delete children if they exist.
deletingChildrenIfNeeded
in interface ChildrenDeletable
public BackgroundPathable<Void> withVersion(int version)
Versionable
withVersion
in interface Versionable<BackgroundPathable<Void>>
version
- version to usepublic ErrorListenerPathable<Void> inBackground(BackgroundCallback callback, Object context)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<Void>>
callback
- a functor that will get called when the operation has completedcontext
- context object - will be available from the event sent to the listenerpublic ErrorListenerPathable<Void> inBackground(BackgroundCallback callback, Object context, Executor executor)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<Void>>
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 callpublic ErrorListenerPathable<Void> inBackground(BackgroundCallback callback)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<Void>>
callback
- a functor that will get called when the operation has completedpublic ErrorListenerPathable<Void> inBackground(BackgroundCallback callback, Executor executor)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<Void>>
callback
- a functor that will get called when the operation has completedexecutor
- executor to use for the background callpublic ErrorListenerPathable<Void> inBackground()
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<Void>>
public ErrorListenerPathable<Void> inBackground(Object context)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerPathable<Void>>
context
- context object - will be available from the event sent to the listenerpublic Pathable<Void> withUnhandledErrorListener(UnhandledErrorListener listener)
ErrorListenerPathable
withUnhandledErrorListener
in interface ErrorListenerPathable<Void>
listener
- the listenerpublic void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<String> operationAndData) throws Exception
Exception
public Void forPath(String path) throws Exception
Pathable
protected int getVersion()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.