Interface TransactionOperations<T>

    • Method Detail

      • getConnection

        @NonNull
        T getConnection()
        Obtains the connection for the current transaction.
        Returns:
        The connection
        Throws:
        NoTransactionException - if no connection exists for the current transaction
      • hasConnection

        boolean hasConnection()
        Check if the connection exists.
        Returns:
        True if transaction exists
        Since:
        3.3
      • execute

        <R> R execute​(@NonNull
                      TransactionDefinition definition,
                      @NonNull
                      TransactionCallback<T,​R> callback)
        Execute a transaction within the context of the function.
        Type Parameters:
        R - The result
        Parameters:
        definition - The transaction definition
        callback - The call back
        Returns:
        The result
      • executeRead

        <R> R executeRead​(@NonNull
                          TransactionCallback<T,​R> callback)
        Execute a read-only transaction within the context of the function.
        Type Parameters:
        R - The result
        Parameters:
        callback - The call back
        Returns:
        The result
      • executeWrite

        <R> R executeWrite​(@NonNull
                           TransactionCallback<T,​R> callback)
        Execute a default transaction within the context of the function.
        Type Parameters:
        R - The result
        Parameters:
        callback - The call back
        Returns:
        The result