Package com.github.kagkarlsson.scheduler
Class Executor
- java.lang.Object
-
- com.github.kagkarlsson.scheduler.Executor
-
public class Executor extends Object
-
-
Constructor Summary
Constructors Constructor Description Executor(ExecutorService executorService, Clock clock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UUIDaddCurrentlyProcessing(CurrentlyExecuting currentlyExecuting)voidaddToQueue(Runnable r, Runnable afterDone)List<CurrentlyExecuting>getCurrentlyExecuting()intgetNumberInQueueOrProcessing()voidremoveCurrentlyProcessing(UUID executionId)voidstop(Duration shutdownMaxWait)
-
-
-
Constructor Detail
-
Executor
public Executor(ExecutorService executorService, Clock clock)
-
-
Method Detail
-
getCurrentlyExecuting
public List<CurrentlyExecuting> getCurrentlyExecuting()
-
stop
public void stop(Duration shutdownMaxWait)
-
getNumberInQueueOrProcessing
public int getNumberInQueueOrProcessing()
-
addCurrentlyProcessing
public UUID addCurrentlyProcessing(CurrentlyExecuting currentlyExecuting)
-
removeCurrentlyProcessing
public void removeCurrentlyProcessing(UUID executionId)
-
-