AsyncWriteOperation<Void>, WriteOperation<Void>AbortTransactionOperation, CommitTransactionOperationpublic abstract class TransactionOperation extends Object implements WriteOperation<Void>, AsyncWriteOperation<Void>
| Modifier | Constructor | Description |
|---|---|---|
protected |
TransactionOperation(WriteConcern writeConcern) |
Construct an instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
Void |
execute(WriteBinding binding) |
General execute which can return anything of type T
|
void |
executeAsync(AsyncWriteBinding binding,
SingleResultCallback<Void> callback) |
General execute which can return anything of type T
|
protected abstract String |
getCommandName() |
Gets the command name.
|
WriteConcern |
getWriteConcern() |
Gets the write concern.
|
protected TransactionOperation(WriteConcern writeConcern)
writeConcern - the write concernpublic WriteConcern getWriteConcern()
public Void execute(WriteBinding binding)
WriteOperationexecute in interface WriteOperation<Void>binding - the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
AsyncWriteOperationexecuteAsync in interface AsyncWriteOperation<Void>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executedprotected abstract String getCommandName()