Class CuratorMultiTransactionImpl
java.lang.Object
org.apache.curator.framework.imps.CuratorMultiTransactionImpl
- All Implemented Interfaces:
Backgroundable<ErrorListenerMultiTransactionMain>
,ErrorListenerMultiTransactionMain
,CuratorMultiTransaction
,CuratorMultiTransactionMain
public class CuratorMultiTransactionImpl
extends Object
implements CuratorMultiTransaction, CuratorMultiTransactionMain, ErrorListenerMultiTransactionMain
-
Constructor Summary
ConstructorDescriptionCuratorMultiTransactionImpl
(CuratorFrameworkImpl client, Backgrounding backgrounding) -
Method Summary
Modifier and TypeMethodDescriptionforOperations
(List<CuratorOp> operations) Commit the given operations as a single transaction.forOperations
(CuratorOp... operations) Commit the given operations as a single transaction.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<org.apache.curator.framework.imps.CuratorMultiTransactionRecord> operationAndData) Set an error listener for this background operation.
-
Constructor Details
-
CuratorMultiTransactionImpl
-
CuratorMultiTransactionImpl
-
-
Method Details
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerMultiTransactionMain>
- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerMultiTransactionMain>
- Parameters:
context
- context object - will be available from the event sent to the listener- Returns:
- this
-
inBackground
Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerMultiTransactionMain>
- 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<ErrorListenerMultiTransactionMain>
- 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 ErrorListenerMultiTransactionMain inBackground(BackgroundCallback callback, Executor executor) Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerMultiTransactionMain>
- Parameters:
callback
- a functor that will get called when the operation has completedexecutor
- executor to use for the background call- Returns:
- this
-
inBackground
public ErrorListenerMultiTransactionMain inBackground(BackgroundCallback callback, Object context, Executor executor) Description copied from interface:Backgroundable
Perform the action in the background- Specified by:
inBackground
in interfaceBackgroundable<ErrorListenerMultiTransactionMain>
- 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
Description copied from interface:ErrorListenerMultiTransactionMain
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 interfaceErrorListenerMultiTransactionMain
- Parameters:
listener
- the listener- Returns:
- this for chaining
-
forOperations
Description copied from interface:CuratorMultiTransactionMain
Commit the given operations as a single transaction. Create the operation instances viaCuratorFramework.transactionOp()
- Specified by:
forOperations
in interfaceCuratorMultiTransactionMain
- Parameters:
operations
- operations that make up the transaction.- Returns:
- result details for foreground operations or
null
for background operations - Throws:
Exception
- errors
-
forOperations
Description copied from interface:CuratorMultiTransactionMain
Commit the given operations as a single transaction. Create the operation instances viaCuratorFramework.transactionOp()
- Specified by:
forOperations
in interfaceCuratorMultiTransactionMain
- Parameters:
operations
- operations that make up the transaction.- Returns:
- result details for foreground operations or
null
for background operations - Throws:
Exception
- errors
-
getBackgroundEventType
-
performBackgroundOperation
public void performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<org.apache.curator.framework.imps.CuratorMultiTransactionRecord> operationAndData) throws Exception - Throws:
Exception
-