Class RunOrQueueComponent

java.lang.Object
org.sterl.spring.persistent_tasks.scheduler.component.RunOrQueueComponent

public class RunOrQueueComponent extends Object

Not a spring bean!

  • Constructor Details

    • RunOrQueueComponent

      public RunOrQueueComponent()
  • Method Details

    • execute

      public <T extends Serializable> TriggerKey execute(AddTriggerRequest<T> triggerRequest)
      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()