类 GenericReactiveTransaction

    • 构造器概要

      构造器 
      构造器说明
      GenericReactiveTransaction​(Object transaction, boolean newTransaction, boolean newSynchronization, boolean readOnly, boolean debug, Object suspendedResources)
      Create a new DefaultReactiveTransactionStatus instance.
    • 构造器详细资料

      • GenericReactiveTransaction

        public GenericReactiveTransaction​(@Nullable
                                          Object transaction,
                                          boolean newTransaction,
                                          boolean newSynchronization,
                                          boolean readOnly,
                                          boolean debug,
                                          @Nullable
                                          Object suspendedResources)
        Create a new DefaultReactiveTransactionStatus instance.
        参数:
        transaction - underlying transaction object that can hold state for the internal transaction implementation
        newTransaction - if the transaction is new, otherwise participating in an existing transaction
        newSynchronization - if a new transaction synchronization has been opened for the given transaction
        readOnly - whether the transaction is marked as read-only
        debug - should debug logging be enabled for the handling of this transaction? Caching it in here can prevent repeated calls to ask the logging system whether debug logging should be enabled.
        suspendedResources - a holder for resources that have been suspended for this transaction, if any
    • 方法详细资料

      • hasTransaction

        public boolean hasTransaction()
        Return whether there is an actual transaction active.
      • isNewSynchronization

        public boolean isNewSynchronization()
        Return if a new transaction synchronization has been opened for this transaction.
      • isReadOnly

        public boolean isReadOnly()
        Return if this transaction is defined as read-only transaction.
      • isDebug

        public boolean isDebug()
        Return whether the progress of this transaction is debugged. This is used by AbstractReactiveTransactionManager as an optimization, to prevent repeated calls to logger.isDebugEnabled(). Not really intended for client code.
      • setRollbackOnly

        public void setRollbackOnly()
        从接口复制的说明: TransactionExecution
        Set the transaction rollback-only. This instructs the transaction manager that the only possible outcome of the transaction may be a rollback, as alternative to throwing an exception which would in turn trigger a rollback.
        指定者:
        setRollbackOnly 在接口中 TransactionExecution
      • isRollbackOnly

        public boolean isRollbackOnly()
        Determine the rollback-only flag via checking this ReactiveTransactionStatus.

        Will only return "true" if the application called setRollbackOnly on this TransactionStatus object.

        指定者:
        isRollbackOnly 在接口中 TransactionExecution
      • setCompleted

        public void setCompleted()
        Mark this transaction as completed, that is, committed or rolled back.