Class StubThreadLocalTransactionManager

    • Constructor Detail

      • StubThreadLocalTransactionManager

        @Beta
        public StubThreadLocalTransactionManager()
    • Method Detail

      • inTransactionReturnsThrows

        public <T,​E extends Exception> T inTransactionReturnsThrows​(ThrowingTransactionalSupplier<T,​E> work)
                                                                   throws E extends Exception
        Description copied from interface: TransactionManager
        Should do any work necessary to start a (new) transaction, call work and then either commit on success or rollback on failure, flushing and closing any prepared statements prior to a commit and firing post commit hooks immediately afterwards.
        Type Parameters:
        T - The type returned.
        E - The exception type.
        Parameters:
        work - Code which must be called while the transaction is active.
        Returns:
        The result of supplier.
        Throws:
        E - If any exception is thrown by Runnable.
        E extends Exception
      • inTransaction

        public final void inTransaction​(Runnable runnable)
        Description copied from interface: TransactionManager
        Should do any work necessary to start a (new) transaction, call runnable and then either commit on success or rollback on failure, flushing and closing any prepared statements prior to a commit and firing post commit hooks immediately afterwards
        Specified by:
        inTransaction in interface TransactionManager
        Parameters:
        runnable - Code which must be called while the transaction is active..
      • inTransaction

        public final void inTransaction​(TransactionalWork work)
        Description copied from interface: TransactionManager
        Should do any work necessary to start a (new) transaction, call runnable and then either commit on success or rollback on failure, flushing and closing any prepared statements prior to a commit and firing post commit hooks immediately afterwards
        Specified by:
        inTransaction in interface TransactionManager
        Parameters:
        work - Code which must be called while the transaction is active..
      • inTransactionReturns

        public final <T> T inTransactionReturns​(TransactionalSupplier<T> supplier)
        Description copied from interface: TransactionManager
        Should do any work necessary to start a (new) transaction, call runnable and then either commit on success or rollback on failure, flushing and closing any prepared statements prior to a commit and firing post commit hooks immediately afterwards.
        Specified by:
        inTransactionReturns in interface TransactionManager
        Type Parameters:
        T - The type returned.
        Parameters:
        supplier - Code which must be called while the transaction is active.
        Returns:
        The result of supplier.
      • inTransactionThrows

        public final <E extends Exception> void inTransactionThrows​(ThrowingTransactionalWork<E> work)
                                                             throws E extends Exception
        Description copied from interface: TransactionManager
        Should do any work necessary to start a (new) transaction, call runnable and then either commit on success or rollback on failure, flushing and closing any prepared statements prior to a commit and firing post commit hooks immediately afterwards.
        Specified by:
        inTransactionThrows in interface TransactionManager
        Type Parameters:
        E - The exception type.
        Parameters:
        work - Code which must be called while the transaction is active.
        Throws:
        E - If any exception is thrown by Runnable.
        E extends Exception