Class StandardScheduledExecutor

java.lang.Object
com.kingsrook.qqq.backend.core.scheduler.simple.StandardScheduledExecutor

public class StandardScheduledExecutor extends Object
Standard class ran by SimpleScheduler. Takes a Runnable in its constructor - that's the code that actually executes. Internally, this class will launch a newSingleThreadScheduledExecutor / ScheduledExecutorService to run the runnable on a repeating delay.
  • Field Details

  • Constructor Details

    • StandardScheduledExecutor

      public StandardScheduledExecutor(Runnable runnable)
      Constructor
  • Method Details

    • getRunnable

      public Runnable getRunnable()
    • start

      public boolean start()
      Returns:
      true iff the schedule was started
    • stopAsync

      public void stopAsync()
      Stop, and don't wait to check if it worked or anything
    • stop

      public boolean stop()
      Issue a stop, and wait (a while) for it to succeed.
      Returns:
      true iff we see that the service fully stopped.
    • getInitialDelayMillis

      public Integer getInitialDelayMillis()
      Getter for initialDelayMillis
    • setInitialDelayMillis

      public void setInitialDelayMillis(Integer initialDelayMillis)
      Setter for initialDelayMillis
    • getDelayMillis

      public Integer getDelayMillis()
      Getter for delayMillis
    • setDelayMillis

      public void setDelayMillis(Integer delayMillis)
      Setter for delayMillis
    • setQInstance

      public void setQInstance(QInstance qInstance)
      Setter for qInstance
    • setName

      public void setName(String name)
      Setter for name
    • setSessionSupplier

      public void setSessionSupplier(Supplier<QSession> sessionSupplier)
      Setter for sessionSupplier
    • getRunningState

      public StandardScheduledExecutor.RunningState getRunningState()
      Getter for runningState
    • getName

      public String getName()
      Getter for name