public class CuratorMultiTransactionImpl extends Object implements CuratorMultiTransaction, CuratorMultiTransactionMain, ErrorListenerMultiTransactionMain
Constructor and Description |
---|
CuratorMultiTransactionImpl(CuratorFrameworkImpl client) |
CuratorMultiTransactionImpl(CuratorFrameworkImpl client,
Backgrounding backgrounding) |
Modifier and Type | Method and Description |
---|---|
List<CuratorTransactionResult> |
forOperations(CuratorOp... operations)
Commit the given operations as a single transaction.
|
List<CuratorTransactionResult> |
forOperations(List<CuratorOp> operations)
Commit the given operations as a single transaction.
|
ErrorListenerMultiTransactionMain |
inBackground()
Perform the action in the background
|
ErrorListenerMultiTransactionMain |
inBackground(BackgroundCallback callback)
Perform the action in the background
|
ErrorListenerMultiTransactionMain |
inBackground(BackgroundCallback callback,
Executor executor)
Perform the action in the background
|
ErrorListenerMultiTransactionMain |
inBackground(BackgroundCallback callback,
Object context)
Perform the action in the background
|
ErrorListenerMultiTransactionMain |
inBackground(BackgroundCallback callback,
Object context,
Executor executor)
Perform the action in the background
|
ErrorListenerMultiTransactionMain |
inBackground(Object context)
Perform the action in the background
|
void |
performBackgroundOperation(org.apache.curator.framework.imps.OperationAndData<org.apache.curator.framework.imps.CuratorMultiTransactionRecord> operationAndData) |
CuratorMultiTransactionMain |
withUnhandledErrorListener(UnhandledErrorListener listener)
Set an error listener for this background operation.
|
public CuratorMultiTransactionImpl(CuratorFrameworkImpl client)
public CuratorMultiTransactionImpl(CuratorFrameworkImpl client, Backgrounding backgrounding)
public ErrorListenerMultiTransactionMain inBackground()
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerMultiTransactionMain>
public ErrorListenerMultiTransactionMain inBackground(Object context)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerMultiTransactionMain>
context
- context object - will be available from the event sent to the listenerpublic ErrorListenerMultiTransactionMain inBackground(BackgroundCallback callback)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerMultiTransactionMain>
callback
- a functor that will get called when the operation has completedpublic ErrorListenerMultiTransactionMain inBackground(BackgroundCallback callback, Object context)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerMultiTransactionMain>
callback
- a functor that will get called when the operation has completedcontext
- context object - will be available from the event sent to the listenerpublic ErrorListenerMultiTransactionMain inBackground(BackgroundCallback callback, Executor executor)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerMultiTransactionMain>
callback
- a functor that will get called when the operation has completedexecutor
- executor to use for the background callpublic ErrorListenerMultiTransactionMain inBackground(BackgroundCallback callback, Object context, Executor executor)
Backgroundable
inBackground
in interface Backgroundable<ErrorListenerMultiTransactionMain>
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 CuratorMultiTransactionMain withUnhandledErrorListener(UnhandledErrorListener listener)
ErrorListenerMultiTransactionMain
withUnhandledErrorListener
in interface ErrorListenerMultiTransactionMain
listener
- the listenerpublic List<CuratorTransactionResult> forOperations(CuratorOp... operations) throws Exception
CuratorMultiTransactionMain
CuratorFramework.transactionOp()
forOperations
in interface CuratorMultiTransactionMain
operations
- operations that make up the transaction.null
for background operationsException
- errorspublic List<CuratorTransactionResult> forOperations(List<CuratorOp> operations) throws Exception
CuratorMultiTransactionMain
CuratorFramework.transactionOp()
forOperations
in interface CuratorMultiTransactionMain
operations
- operations that make up the transaction.null
for background operationsException
- errorsCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.