Class StateException

All Implemented Interfaces:
Serializable

public class StateException extends TnsAIException
Exception thrown when state operations fail.

This exception is thrown by checkpointer implementations when operations like save, load, or delete fail. It wraps the underlying cause (IO errors, serialization errors, etc.) with retry semantics.

Example scenarios:

  • File system errors (disk full, permissions)
  • Database connection failures
  • Serialization/deserialization errors
  • Network errors (Redis, remote storage)
See Also:
  • Constructor Details

    • StateException

      public StateException(String message)
      Creates a StateException with a message.
      Parameters:
      message - error message
    • StateException

      public StateException(String message, Throwable cause)
      Creates a StateException with a message and cause.
      Parameters:
      message - error message
      cause - underlying cause
  • Method Details

    • getSuggestedRetryDelayMs

      public long getSuggestedRetryDelayMs()
      Suggested retry delay for state operations.
      Overrides:
      getSuggestedRetryDelayMs in class TnsAIException
      Returns:
      500ms initial delay
    • getMaxRetryAttempts

      public int getMaxRetryAttempts()
      Maximum retry attempts for state operations.
      Overrides:
      getMaxRetryAttempts in class TnsAIException
      Returns:
      3 attempts