Class ContextExecutor
java.lang.Object
org.sentrysoftware.metricshub.engine.strategy.ContextExecutor
Executor for executing a strategy in a separate thread with timeout handling.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()This method prepares the strategy, runs the run method it in a separate thread.
-
Constructor Details
-
ContextExecutor
public ContextExecutor()
-
-
Method Details
-
execute
This method prepares the strategy, runs the run method it in a separate thread. Upon thread completion, it calls the post method of the IStrategy instance and ensures proper termination of the task- Throws:
InterruptedException- if the thread is interrupted while waitingTimeoutException- if the wait timed outExecutionException- if the computation threw an exception
-