Class SyncBuilderImpl
- java.lang.Object
-
- org.apache.curator.framework.imps.SyncBuilderImpl
-
- All Implemented Interfaces:
Backgroundable<ErrorListenerPathable<java.lang.Void>>,BackgroundPathable<java.lang.Void>,ErrorListenerPathable<java.lang.Void>,Pathable<java.lang.Void>,SyncBuilder
public class SyncBuilderImpl extends java.lang.Object implements SyncBuilder, ErrorListenerPathable<java.lang.Void>
-
-
Constructor Summary
Constructors Constructor Description SyncBuilderImpl(CuratorFrameworkImpl client)SyncBuilderImpl(CuratorFrameworkImpl client, Backgrounding backgrounding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.VoidforPath(java.lang.String path)Commit the currently building operation using the given pathErrorListenerPathable<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)Pathable<java.lang.Void>withUnhandledErrorListener(UnhandledErrorListener listener)Set an error listener for this background operation.
-
-
-
Constructor Detail
-
SyncBuilderImpl
public SyncBuilderImpl(CuratorFrameworkImpl client)
-
SyncBuilderImpl
public SyncBuilderImpl(CuratorFrameworkImpl client, Backgrounding backgrounding)
-
-
Method Detail
-
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
-
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.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.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(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
-
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
-
-