public interface TransactionConfiguration
Transaction configuration.| Modifier and Type | Method and Description |
|---|---|
static TransactionConfiguration |
create(boolean rollbackOnError,
boolean autoCommit)
Create a
TransactionConfiguration. |
static TransactionConfiguration |
create(boolean rollbackOnError,
boolean autoCommit,
TransactionOptions transactionOptions)
Create a
TransactionConfiguration. |
static TransactionConfiguration |
create(TransactionOptions transactionOptions)
Create a
TransactionConfiguration. |
static TransactionConfiguration |
getDefault()
Create a default
TransactionConfiguration setting transaction rollback on errors to true. |
Optional<TransactionOptions> |
getTransactionOptions()
Get the transaction configuration options, if any.
|
boolean |
isAutoCommit()
Gets whether the transaction must be committed when a transactional operation ends and no error occurred.
|
boolean |
isRollbackOnError()
Gets whether the transaction must be rolled back when an exception is thrown during a transactional operation
execution.
|
static TransactionConfiguration |
withAutoCommit()
Create a
TransactionConfiguration setting transaction auto-commit to true. |
boolean isRollbackOnError()
Default is true.
true if the transaction must be rolled back when an exception is thrown during a
transactional operation execution, false otherwiseboolean isAutoCommit()
Default is false.
true to commit the transaction when a transactional operation endsOptional<TransactionOptions> getTransactionOptions()
static TransactionConfiguration getDefault()
TransactionConfiguration setting transaction rollback on errors to true.TransactionConfigurationstatic TransactionConfiguration withAutoCommit()
TransactionConfiguration setting transaction auto-commit to true.isAutoCommit()static TransactionConfiguration create(boolean rollbackOnError, boolean autoCommit)
TransactionConfiguration.rollbackOnError - Whether the transaction must be rolled back when an exception is thrown during a
transactional operation execution.autoCommit - whether the transaction must be committed when a transactional operation ends and no error
occurredstatic TransactionConfiguration create(TransactionOptions transactionOptions)
TransactionConfiguration.transactionOptions - The transation configuration optionsstatic TransactionConfiguration create(boolean rollbackOnError, boolean autoCommit, TransactionOptions transactionOptions)
TransactionConfiguration.rollbackOnError - Whether the transaction must be rolled back when an exception is thrown during a
transactional operation execution.autoCommit - whether the transaction must be committed when a transactional operation ends and no error
occurredtransactionOptions - The transation configuration optionsCopyright © 2019 The Holon Platform. All rights reserved.