Class StandardScheduledExecutor
java.lang.Object
com.kingsrook.qqq.backend.core.scheduler.simple.StandardScheduledExecutor
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for delayMillisGetter for initialDelayMillisgetName()
Getter for nameGetter for runningStatevoid
setDelayMillis
(Integer delayMillis) Setter for delayMillisvoid
setInitialDelayMillis
(Integer initialDelayMillis) Setter for initialDelayMillisvoid
Setter for namevoid
setQInstance
(QInstance qInstance) Setter for qInstancevoid
setSessionSupplier
(Supplier<QSession> sessionSupplier) Setter for sessionSupplierboolean
start()
boolean
stop()
Issue a stop, and wait (a while) for it to succeed.void
Stop, and don't wait to check if it worked or anything
-
Field Details
-
qInstance
-
name
-
sessionSupplier
-
-
Constructor Details
-
StandardScheduledExecutor
Constructor
-
-
Method Details
-
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
Getter for initialDelayMillis -
setInitialDelayMillis
Setter for initialDelayMillis -
getDelayMillis
Getter for delayMillis -
setDelayMillis
Setter for delayMillis -
setQInstance
Setter for qInstance -
setName
Setter for name -
setSessionSupplier
-
getRunningState
Getter for runningState -
getName
Getter for name
-