Class LeanGammaTxnExecutor

    • Constructor Detail

      • LeanGammaTxnExecutor

        public LeanGammaTxnExecutor​(GammaTxnFactory txnFactory)
    • Method Detail

      • execute

        public void execute​(Runnable runnable)
      • execute

        public <E> E execute​(Callable<E> callable)
      • getTxnFactory

        public GammaTxnFactory getTxnFactory()
        Description copied from interface: TxnExecutor
        Returns the TxnFactory that is used by this TxnExecutor to create transactions used to execute transactional closures.
        Returns:
        the TxnFactory used by this TxnExecutor.
      • executeChecked

        public final <E> E executeChecked​(TxnCallable<E> callable)
                                   throws Exception
        Description copied from interface: TxnExecutor
        Executes the callable.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
        Throws:
        NullPointerException - if callable is null.
        Exception - if the execute call fails.
      • execute

        public final <E> E execute​(TxnCallable<E> callable)
        Description copied from interface: TxnExecutor
        Executes the transactional callable. If in the execution of the callable a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
      • executeChecked

        public final int executeChecked​(TxnIntCallable callable)
                                 throws Exception
        Description copied from interface: TxnExecutor
        Executes the callable.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
        Throws:
        NullPointerException - if callable is null.
        Exception - if the execute call fails.
      • execute

        public final int execute​(TxnIntCallable callable)
        Description copied from interface: TxnExecutor
        Executes the transactional callable. If in the execution of the callable a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
      • executeChecked

        public final long executeChecked​(TxnLongCallable callable)
                                  throws Exception
        Description copied from interface: TxnExecutor
        Executes the callable.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
        Throws:
        NullPointerException - if callable is null.
        Exception - if the execute call fails.
      • execute

        public final long execute​(TxnLongCallable callable)
        Description copied from interface: TxnExecutor
        Executes the transactional callable. If in the execution of the callable a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
      • executeChecked

        public final double executeChecked​(TxnDoubleCallable callable)
                                    throws Exception
        Description copied from interface: TxnExecutor
        Executes the callable.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
        Throws:
        NullPointerException - if callable is null.
        Exception - if the execute call fails.
      • execute

        public final double execute​(TxnDoubleCallable callable)
        Description copied from interface: TxnExecutor
        Executes the transactional callable. If in the execution of the callable a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
      • executeChecked

        public final boolean executeChecked​(TxnBooleanCallable callable)
                                     throws Exception
        Description copied from interface: TxnExecutor
        Executes the callable.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
        Throws:
        NullPointerException - if callable is null.
        Exception - if the execute call fails.
      • execute

        public final boolean execute​(TxnBooleanCallable callable)
        Description copied from interface: TxnExecutor
        Executes the transactional callable. If in the execution of the callable a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.
        Parameters:
        callable - the callable to execute.
        Returns:
        the result of the execution.
      • execute

        public final void execute​(TxnVoidCallable callable)
        Description copied from interface: TxnExecutor
        Executes the transactional callable. If in the execution of the callable a checked exception is thrown, the exception is wrapped in a InvisibleCheckedException. The original exception can be retrieved by calling the getCause method.
        Parameters:
        callable - the callable to execute.