public interface TransactionPropagator
| Modifier and Type | Method and Description |
|---|---|
default void |
mandatory(Runnable action)
Support a current transaction, throw an exception if none exists.
|
<R> R |
mandatory(java.util.function.Supplier<R> action)
Support a current transaction, throw an exception if none exists.
|
default void |
never(Runnable action)
Execute non-transactionally, throw an exception if a transaction exists.
|
<R> R |
never(java.util.function.Supplier<R> action)
Execute non-transactionally, throw an exception if a transaction exists.
|
default void |
notSupported(Runnable action)
Execute non-transactionally, suspend the current transaction if one exists.
|
<R> R |
notSupported(java.util.function.Supplier<R> action)
Execute non-transactionally, suspend the current transaction if one exists.
|
default void |
required(Runnable action)
Support a current transaction, create a new one if none exists.
|
<R> R |
required(java.util.function.Supplier<R> action)
Support a current transaction, create a new one if none exists.
|
default void |
requiresNew(Runnable action)
Create a new transaction, suspend the current transaction if one exists.
|
<R> R |
requiresNew(java.util.function.Supplier<R> action)
Create a new transaction, suspend the current transaction if one exists.
|
default void |
supports(Runnable action)
Support a current transaction, execute it without a transaction if none exists.
|
<R> R |
supports(java.util.function.Supplier<R> action)
Support a current transaction, execute it without a transaction if none exists.
|
default void mandatory(Runnable action)
MARKED_ROLLBACK.action - The action instance will be called inside.IllegalStateException - if there is no active transaction.<R> R mandatory(java.util.function.Supplier<R> action)
MARKED_ROLLBACK.R - Return type.action - The action instance will be called inside.IllegalStateException - if there is no active transaction.default void never(Runnable action)
action - The action instance will be called inside.IllegalStateException - if the status of the current thread is different from
STATUS_NO_TRANSACTION.<R> R never(java.util.function.Supplier<R> action)
R - Return type.action - The action instance will be called inside.IllegalStateException - if the status of the current thread is different from
STATUS_NO_TRANSACTION.default void notSupported(Runnable action)
action - The action instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
STATUS_ACTIVE nor STATUS_NO_TRANSACTION.<R> R notSupported(java.util.function.Supplier<R> action)
R - Return type.action - The action instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
STATUS_ACTIVE nor STATUS_NO_TRANSACTION.default void required(Runnable action)
action - The action instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
STATUS_ACTIVE nor STATUS_NO_TRANSACTION.<R> R required(java.util.function.Supplier<R> action)
R - Return type.action - The action instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
STATUS_ACTIVE nor STATUS_NO_TRANSACTION.default void requiresNew(Runnable action)
action - The action instance will be called inside.<R> R requiresNew(java.util.function.Supplier<R> action)
R - Return type.action - The action instance will be called inside.default void supports(Runnable action)
action - The action instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
STATUS_ACTIVE nor STATUS_NO_TRANSACTION.<R> R supports(java.util.function.Supplier<R> action)
R - Return type.action - The action instance will be called inside.IllegalStateException - if the transaction status at the time of calling this function is neither
STATUS_ACTIVE nor STATUS_NO_TRANSACTION.Copyright © 2011–2015 Everit Kft.. All rights reserved.