Class TgTmRetryInstruction
- java.lang.Object
-
- com.tsurugidb.iceaxe.transaction.manager.retry.TgTmRetryInstruction
-
public final class TgTmRetryInstruction extends java.lang.Object
Tsurugi TransactionManager retry instruction.
-
-
Constructor Summary
Constructors Constructor Description TgTmRetryInstruction(TgTmRetryCode retryCode, java.lang.String reasonMessage)
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isRetryable()
whether to retry.static TgTmRetryInstruction
of(TgTmRetryCode retryCode, com.tsurugidb.tsubakuro.exception.DiagnosticCode code)
Creates a new instance.static TgTmRetryInstruction
of(TgTmRetryCode retryCode, java.lang.String reasonMessage)
Creates a new instance.static TgTmRetryInstruction
ofNotRetryable(com.tsurugidb.tsubakuro.exception.DiagnosticCode code)
Creates a new instance.static TgTmRetryInstruction
ofNotRetryable(java.lang.String reasonMessage)
Creates a new instance.static TgTmRetryInstruction
ofRetryable(com.tsurugidb.tsubakuro.exception.DiagnosticCode code)
Creates a new instance.static TgTmRetryInstruction
ofRetryable(java.lang.String reasonMessage)
Creates a new instance.static TgTmRetryInstruction
ofRetryableLtx(java.lang.String reasonMessage)
Creates a new instance.java.lang.String
reasonMessage()
get reason message.TgTmRetryCode
retryCode()
get retry code.java.lang.String
toString()
-
-
-
Constructor Detail
-
TgTmRetryInstruction
public TgTmRetryInstruction(@Nonnull TgTmRetryCode retryCode, @Nonnull java.lang.String reasonMessage)
Creates a new instance.- Parameters:
retryCode
- retry codereasonMessage
- 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 codecode
- 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 codereasonMessage
- 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 classjava.lang.Object
-
-