Class GammaOrElseBlock

    • Constructor Detail

      • GammaOrElseBlock

        public GammaOrElseBlock()
    • Method Detail

      • execute

        public <E> E execute​(TxnCallable<E> either,
                             TxnCallable<E> orelse)
        Description copied from interface: OrElseBlock
        Executes 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:
        execute in interface OrElseBlock
        Returns:
        the result of the execution.
      • execute

        public int execute​(TxnIntCallable either,
                           TxnIntCallable orelse)
        Description copied from interface: OrElseBlock
        Executes 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:
        execute in interface OrElseBlock
        Returns:
        the result of the execution.
      • execute

        public long execute​(TxnLongCallable either,
                            TxnLongCallable orelse)
        Description copied from interface: OrElseBlock
        Executes 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:
        execute in interface OrElseBlock
        Returns:
        the result of the execution.
      • execute

        public double execute​(TxnDoubleCallable either,
                              TxnDoubleCallable orelse)
        Description copied from interface: OrElseBlock
        Executes 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:
        execute in interface OrElseBlock
        Returns:
        the result of the execution.
      • execute

        public boolean execute​(TxnBooleanCallable either,
                               TxnBooleanCallable orelse)
        Description copied from interface: OrElseBlock
        Executes 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:
        execute in interface OrElseBlock
        Returns:
        the result of the execution.
      • execute

        public void execute​(TxnVoidCallable either,
                            TxnVoidCallable orelse)
        Description copied from interface: OrElseBlock
        Executes 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:
        execute in interface OrElseBlock