Class TaskTimeoutSettings
java.lang.Object
org.axonframework.messaging.core.timeout.TaskTimeoutSettings
Configuration properties for a task timeout. Used in other parts of the configuration.
- Since:
- 4.11.0
- Author:
- Mitchell Herrijgers
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newTaskTimeoutSettingswith default timeout settings.TaskTimeoutSettings(int timeoutMs, int warningThresholdMs, int warningIntervalMs) Creates a newTaskTimeoutSettingswith the provided timeout settings. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the timeout of the message handler in milliseconds.intReturns the interval in milliseconds between warnings.intReturns the threshold in milliseconds after which a warning is logged.voidsetTimeoutMs(int timeoutMs) Sets the timeout of the message handler in milliseconds.voidsetWarningIntervalMs(int warningIntervalMs) Sets the interval in milliseconds between warnings.voidsetWarningThresholdMs(int warningThresholdMs) Sets the threshold in milliseconds after which a warning is logged.
-
Constructor Details
-
TaskTimeoutSettings
public TaskTimeoutSettings(int timeoutMs, int warningThresholdMs, int warningIntervalMs) Creates a newTaskTimeoutSettingswith the provided timeout settings.- Parameters:
timeoutMs- the timeout in millisecondswarningThresholdMs- the threshold in milliseconds after which a warning is logged. Setting this to a value higher than or equal totimeoutwill disable warnings.warningIntervalMs- the interval in milliseconds between warnings
-
TaskTimeoutSettings
public TaskTimeoutSettings()Creates a newTaskTimeoutSettingswith 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 thantimeoutwill 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 totimeoutwill 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
-