Package com.mongodb.operation
Class CommitTransactionOperation
java.lang.Object
com.mongodb.operation.TransactionOperation
com.mongodb.operation.CommitTransactionOperation
- All Implemented Interfaces:
AsyncWriteOperation<Void>,WriteOperation<Void>
Deprecated.
An operation that commits a transaction.
- Since:
- 3.8
-
Constructor Summary
ConstructorsConstructorDescriptionCommitTransactionOperation(WriteConcern writeConcern) Deprecated.Construct an instance.CommitTransactionOperation(WriteConcern writeConcern, boolean alreadyCommitted) Deprecated.Construct an instance. -
Method Summary
Modifier and TypeMethodDescriptionexecute(WriteBinding binding) Deprecated.General execute which can return anything of type TvoidexecuteAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback) Deprecated.General execute which can return anything of type TgetMaxCommitTime(TimeUnit timeUnit) Deprecated.Gets the maximum amount of time to allow a single commitTransaction command to execute.maxCommitTime(Long maxCommitTime, TimeUnit timeUnit) Deprecated.Sets the maximum execution time on the server for the commitTransaction operation.recoveryToken(BsonDocument recoveryToken) Deprecated.Set the recovery token.Methods inherited from class com.mongodb.operation.TransactionOperation
getWriteConcern
-
Constructor Details
-
CommitTransactionOperation
Deprecated.Construct an instance.- Parameters:
writeConcern- the write concern
-
CommitTransactionOperation
Deprecated.Construct an instance.- Parameters:
writeConcern- the write concernalreadyCommitted- if the transaction has already been committed.- Since:
- 3.11
-
-
Method Details
-
recoveryToken
Deprecated.Set the recovery token.- Parameters:
recoveryToken- the recovery token- Returns:
- the CommitTransactionOperation
- Since:
- 3.11
-
maxCommitTime
Deprecated.Sets the maximum execution time on the server for the commitTransaction operation.- Parameters:
maxCommitTime- the max commit time, which must be either null or greater than zero, in the given time unittimeUnit- the time unit, which may not be null- Returns:
- this
- Since:
- 3.11
-
getMaxCommitTime
Deprecated.Gets the maximum amount of time to allow a single commitTransaction command to execute. The default is 0, which places no limit on the execution time.- Parameters:
timeUnit- the time unit to return the result in- Returns:
- the maximum execution time in the given time unit
- Since:
- 3.11
-
execute
Deprecated.Description copied from interface:WriteOperationGeneral execute which can return anything of type T- Specified by:
executein interfaceWriteOperation<Void>- Overrides:
executein classTransactionOperation- Parameters:
binding- the binding to execute in the context of- Returns:
- T, the result of the execution
-
executeAsync
Deprecated.Description copied from interface:AsyncWriteOperationGeneral execute which can return anything of type T- Specified by:
executeAsyncin interfaceAsyncWriteOperation<Void>- Overrides:
executeAsyncin classTransactionOperation- Parameters:
binding- the binding to execute in the context ofcallback- the callback to be called when the operation has been executed
-