Package de.hybris.platform.task.impl
Class SchedulerOperationTimeoutLogger
java.lang.Object
de.hybris.platform.task.impl.SchedulerOperationTimeoutLogger
Checks how much time the scheduler operation takes and warns if the operation is longer than the scheduler interval
-
Constructor Summary
ConstructorsConstructorDescriptionSchedulerOperationTimeoutLogger(RuntimeConfigHolder runtimeConfigHolder, Instant startTime, Consumer<Duration> timeoutConsumer) Creates a new scheduler operation timeout logger -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if scheduler operation takes more time than the scheduler intervalvoidLogs a one-time scheduler operation timeout
-
Constructor Details
-
SchedulerOperationTimeoutLogger
public SchedulerOperationTimeoutLogger(RuntimeConfigHolder runtimeConfigHolder, Instant startTime, Consumer<Duration> timeoutConsumer) Creates a new scheduler operation timeout logger- Parameters:
runtimeConfigHolder- configuration holder
-
-
Method Details
-
isTimeout
public boolean isTimeout()Checks if scheduler operation takes more time than the scheduler interval- Returns:
truewhen timeout occurred
-
logTimeoutOnce
public void logTimeoutOnce()Logs a one-time scheduler operation timeout
-