Class RunOrQueueComponent
java.lang.Object
org.sterl.spring.persistent_tasks.scheduler.component.RunOrQueueComponent
Not a spring bean!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkIfTrigerShouldRun
(long triggerId) void
clear()
<T extends Serializable>
TriggerKeyexecute
(AddTriggerRequest<T> triggerRequest) Runs the given trigger if a free threads are available and the runAt time is not in the future.boolean
-
Constructor Details
-
RunOrQueueComponent
public RunOrQueueComponent()
-
-
Method Details
-
execute
Runs the given trigger if a free threads are available and the runAt time is not in the future.- Returns:
- the reference to the
Future
with the key, if no threads are available it is resolved
-
checkIfTrigerShouldRun
public boolean checkIfTrigerShouldRun(long triggerId) -
hasWaitingTriggers
public boolean hasWaitingTriggers() -
clear
public void clear()
-