Class TaskTimeoutSettings

java.lang.Object
org.axonframework.messaging.core.timeout.TaskTimeoutSettings

public class TaskTimeoutSettings extends Object
Configuration properties for a task timeout. Used in other parts of the configuration.
Since:
4.11.0
Author:
Mitchell Herrijgers
  • Constructor Details

    • TaskTimeoutSettings

      public TaskTimeoutSettings(int timeoutMs, int warningThresholdMs, int warningIntervalMs)
      Creates a new TaskTimeoutSettings with the provided timeout settings.
      Parameters:
      timeoutMs - the timeout in milliseconds
      warningThresholdMs - the threshold in milliseconds after which a warning is logged. Setting this to a value higher than or equal to timeout will disable warnings.
      warningIntervalMs - the interval in milliseconds between warnings
    • TaskTimeoutSettings

      public TaskTimeoutSettings()
      Creates a new TaskTimeoutSettings with default timeout settings. This means all timeouts are disabled.
  • Method Details

    • getTimeoutMs

      public int getTimeoutMs()
      Returns the timeout of the message handler in milliseconds.
      Returns:
      the timeout of the message handler in milliseconds
    • setTimeoutMs

      public void setTimeoutMs(int timeoutMs)
      Sets the timeout of the message handler in milliseconds.
      Parameters:
      timeoutMs - the timeout of the message handler in milliseconds
    • getWarningThresholdMs

      public int getWarningThresholdMs()
      Returns the threshold in milliseconds after which a warning is logged. Setting this to a value higher than timeout will disable warnings.
      Returns:
      the threshold in milliseconds after which a warning is logged
    • setWarningThresholdMs

      public void setWarningThresholdMs(int warningThresholdMs)
      Sets the threshold in milliseconds after which a warning is logged. Setting this to a value higher than or equal to timeout will disable warnings.
      Parameters:
      warningThresholdMs - the threshold in milliseconds after which a warning is logged
    • getWarningIntervalMs

      public int getWarningIntervalMs()
      Returns the interval in milliseconds between warnings.
      Returns:
      the interval in milliseconds between warnings
    • setWarningIntervalMs

      public void setWarningIntervalMs(int warningIntervalMs)
      Sets the interval in milliseconds between warnings.
      Parameters:
      warningIntervalMs - the interval in milliseconds between warnings