Class TgTmRetryInstruction


  • public final class TgTmRetryInstruction
    extends java.lang.Object
    Tsurugi TransactionManager retry instruction.
    • Constructor Detail

      • TgTmRetryInstruction

        public TgTmRetryInstruction​(@Nonnull
                                    TgTmRetryCode retryCode,
                                    @Nonnull
                                    java.lang.String reasonMessage)
        Creates a new instance.
        Parameters:
        retryCode - retry code
        reasonMessage - reason message
    • Method Detail

      • of

        public static TgTmRetryInstruction of​(@Nonnull
                                              TgTmRetryCode retryCode,
                                              @Nonnull
                                              com.tsurugidb.tsubakuro.exception.DiagnosticCode code)
        Creates a new instance.
        Parameters:
        retryCode - retry code
        code - diagnostic code
        Returns:
        retry instruction
      • of

        public static TgTmRetryInstruction of​(@Nonnull
                                              TgTmRetryCode retryCode,
                                              @Nonnull
                                              java.lang.String reasonMessage)
        Creates a new instance.
        Parameters:
        retryCode - retry code
        reasonMessage - reason message
        Returns:
        retry instruction
      • ofRetryable

        public static TgTmRetryInstruction ofRetryable​(@Nonnull
                                                       com.tsurugidb.tsubakuro.exception.DiagnosticCode code)
        Creates a new instance.
        Parameters:
        code - diagnostic code
        Returns:
        retry instruction
      • ofRetryable

        public static TgTmRetryInstruction ofRetryable​(@Nonnull
                                                       java.lang.String reasonMessage)
        Creates a new instance.
        Parameters:
        reasonMessage - reason message
        Returns:
        retry instruction
      • ofRetryableLtx

        public static TgTmRetryInstruction ofRetryableLtx​(@Nonnull
                                                          java.lang.String reasonMessage)
        Creates a new instance.
        Parameters:
        reasonMessage - reason message
        Returns:
        retry instruction
      • ofNotRetryable

        public static TgTmRetryInstruction ofNotRetryable​(@Nonnull
                                                          com.tsurugidb.tsubakuro.exception.DiagnosticCode code)
        Creates a new instance.
        Parameters:
        code - diagnostic code
        Returns:
        retry instruction
      • ofNotRetryable

        public static TgTmRetryInstruction ofNotRetryable​(@Nonnull
                                                          java.lang.String reasonMessage)
        Creates a new instance.
        Parameters:
        reasonMessage - reason message
        Returns:
        retry instruction
      • retryCode

        public TgTmRetryCode retryCode()
        get retry code.
        Returns:
        retry code
      • reasonMessage

        public java.lang.String reasonMessage()
        get reason message.
        Returns:
        reason message
      • isRetryable

        public boolean isRetryable()
        whether to retry.
        Returns:
        true: retryable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object