Package org.multiverse.stms.gamma
Class GammaOrElseBlock
java.lang.Object
org.multiverse.stms.gamma.GammaOrElseBlock
- All Implemented Interfaces:
OrElseBlock,MultiverseConstants
-
Field Summary
Fields inherited from interface org.multiverse.MultiverseConstants
LOCKMODE_EXCLUSIVE, LOCKMODE_NONE, LOCKMODE_READ, LOCKMODE_WRITE, SHAKE_BUGS, SPIN_YIELD, TRACING_ENABLED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(TxnBooleanCallable either, TxnBooleanCallable orelse) Executes the either, or when it is retried, the orelse block.<E> Eexecute(TxnCallable<E> either, TxnCallable<E> orelse) Executes the either, or when it is retried, the orelse block.doubleexecute(TxnDoubleCallable either, TxnDoubleCallable orelse) Executes the either, or when it is retried, the orelse block.intexecute(TxnIntCallable either, TxnIntCallable orelse) Executes the either, or when it is retried, the orelse block.longexecute(TxnLongCallable either, TxnLongCallable orelse) Executes the either, or when it is retried, the orelse block.voidexecute(TxnVoidCallable either, TxnVoidCallable orelse) Executes the either, or when it is retried, the orelse block.booleanexecuteChecked(TxnBooleanCallable either, TxnBooleanCallable orelse) Executes the either, or when it is retried, the orelse block.<E> EexecuteChecked(TxnCallable<E> either, TxnCallable<E> orelse) Executes the either, or when it is retried, the orelse block.doubleexecuteChecked(TxnDoubleCallable either, TxnDoubleCallable orelse) Executes the either, or when it is retried, the orelse block.intexecuteChecked(TxnIntCallable either, TxnIntCallable orelse) Executes the either, or when it is retried, the orelse block.longexecuteChecked(TxnLongCallable either, TxnLongCallable orelse) Executes the either, or when it is retried, the orelse block.voidexecuteChecked(TxnVoidCallable either, TxnVoidCallable orelse) Executes the either, or when it is retried, the orelse block.
-
Constructor Details
-
GammaOrElseBlock
public GammaOrElseBlock()
-
-
Method Details
-
execute
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible. If in the execution of the closure a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.- Specified by:
executein interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
-
executeChecked
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible.- Specified by:
executeCheckedin interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
- Throws:
Exception- if the atomicChecked call fails.
-
execute
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible. If in the execution of the closure a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.- Specified by:
executein interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
-
executeChecked
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible.- Specified by:
executeCheckedin interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
- Throws:
Exception
-
execute
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible. If in the execution of the closure a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.- Specified by:
executein interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
-
executeChecked
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible.- Specified by:
executeCheckedin interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
- Throws:
Exception
-
execute
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible. If in the execution of the closure a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.- Specified by:
executein interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
-
executeChecked
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible.- Specified by:
executeCheckedin interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
- Throws:
Exception
-
execute
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible. If in the execution of the closure a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.- Specified by:
executein interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
-
executeChecked
public boolean executeChecked(TxnBooleanCallable either, TxnBooleanCallable orelse) throws Exception Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible.- Specified by:
executeCheckedin interfaceOrElseBlock- Parameters:
either-orelse-- Returns:
- the result of the execution.
- Throws:
Exception
-
execute
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible. If in the execution of the closure a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.- Specified by:
executein interfaceOrElseBlock- Parameters:
either-orelse-
-
executeChecked
Description copied from interface:OrElseBlockExecutes the either, or when it is retried, the orelse block. This operation makes composable blocking operations possible.- Specified by:
executeCheckedin interfaceOrElseBlock- Parameters:
either-orelse-- Throws:
Exception
-