AsyncReadOperation<Void>
, ReadOperation<Void>
AbortTransactionOperation
, CommitTransactionOperation
public abstract class TransactionOperation extends Object implements ReadOperation<Void>, AsyncReadOperation<Void>
Modifier | Constructor | Description |
---|---|---|
protected |
TransactionOperation(WriteConcern writeConcern) |
Construct an instance.
|
Modifier and Type | Method | Description |
---|---|---|
Void |
execute(ReadBinding binding) |
General execute which can return anything of type T
|
void |
executeAsync(AsyncReadBinding 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(ReadBinding binding)
ReadOperation
execute
in interface ReadOperation<Void>
binding
- the binding to execute in the context ofpublic void executeAsync(AsyncReadBinding binding, SingleResultCallback<Void> callback)
AsyncReadOperation
executeAsync
in interface AsyncReadOperation<Void>
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executedprotected abstract String getCommandName()