public interface AsyncMongoTransaction extends MongoTransaction<com.mongodb.reactivestreams.client.ClientSession>, com.holonplatform.async.datastore.transaction.AsyncTransaction
Transaction.com.holonplatform.core.datastore.transaction.TransactionStatus.IllegalTransactionStatusException, com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException, com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionNotSupportedException| Modifier and Type | Method and Description |
|---|---|
static AsyncMongoTransaction |
create(com.mongodb.reactivestreams.client.ClientSession session,
com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
Create a new
AsyncMongoTransaction. |
static AsyncMongoTransaction |
delegate(AsyncMongoTransaction delegated)
Create a
AsyncMongoTransaction which delegates its operations and status to the given delegated
transaction. |
CompletionStage<Void> |
end()
Finalize the transaction.
|
void |
start()
Start the transaction.
|
getConfiguration, getSessionvoid start()
throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException
TransactionException - If an error occurredcom.holonplatform.core.datastore.transaction.TransactionStatus.TransactionExceptionCompletionStage<Void> end() throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException
CompletionStage to handle the transaction end asynchronouslyTransactionException - If an error occurredcom.holonplatform.core.datastore.transaction.TransactionStatus.TransactionExceptionstatic AsyncMongoTransaction create(com.mongodb.reactivestreams.client.ClientSession session, com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
AsyncMongoTransaction.session - Client session (not null)configuration - Transaction configuration (not null)AsyncMongoTransaction implementationstatic AsyncMongoTransaction delegate(AsyncMongoTransaction delegated)
AsyncMongoTransaction which delegates its operations and status to the given delegated
transaction.
The delegated transaction returns false from the TransactionStatus.isNew() method.
delegated - Delegated transaction (not null)AsyncMongoTransaction implementationCopyright © 2019 The Holon Platform. All rights reserved.