public interface SyncMongoTransaction extends MongoTransaction<com.mongodb.client.ClientSession>, com.holonplatform.core.datastore.transaction.Transaction
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 SyncMongoTransaction |
create(com.mongodb.client.ClientSession session,
com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
Create a new
SyncMongoTransaction. |
static SyncMongoTransaction |
delegate(SyncMongoTransaction delegated)
Create a
SyncMongoTransaction which delegates its operations and status to the given delegated
transaction. |
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.TransactionExceptionvoid end() throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException
TransactionException - If an error occurredcom.holonplatform.core.datastore.transaction.TransactionStatus.TransactionExceptionstatic SyncMongoTransaction create(com.mongodb.client.ClientSession session, com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
SyncMongoTransaction.session - Client session (not null)configuration - Transaction configuration (not null)SyncMongoTransaction implementationstatic SyncMongoTransaction delegate(SyncMongoTransaction delegated)
SyncMongoTransaction 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)SyncMongoTransaction implementationCopyright © 2019 The Holon Platform. All rights reserved.