Interface Scheduler

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
DefaultScheduler

public interface Scheduler extends Closeable
  • Method Details

    • getConfig

      Config getConfig()
    • waitForMessagesToFinish

      void waitForMessagesToFinish()

      Wait for the number of in-flight messages to go to zero. There is no assurance that the count will stay at zero.

      In production, this is used during an orderly shutdown. It is also useful during testing: Add a bunch of message, wait for the messages to clear (with this method), collect/display statistics, if desired, then exit.

    • addMessage

      void addMessage(Jug jug)

      A schedulers job is to accept a message for an actorId. Create the actor and call the actor's processMessage method.

      Called from any thread. Usually delegated from actorGroup's addMessage which does more checking before the message arrives here.

      Not a good idea to call this method directly.

      Parameters:
      jug - The (Jug) message to be processed
    • addNewMessage

      void addNewMessage(Jug jug)
    • getActorGroup

      ActorGroup getActorGroup()
    • setClosing

      void setClosing()
    • decreaseMessageLoad

      void decreaseMessageLoad()
    • incrementActorsEvicted

      void incrementActorsEvicted()
    • increaseMessageLoad

      void increaseMessageLoad()
    • incrementSleepTime

      void incrementSleepTime()
    • incrementActorsRealized

      void incrementActorsRealized()
    • increaseMessageCount

      void increaseMessageCount()
    • increaseSaveCount

      void increaseSaveCount()
    • increaseRestoreCount

      void increaseRestoreCount()
    • increaseErrorCount

      void increaseErrorCount()
    • setActiveThreadCount

      void setActiveThreadCount(int count)
    • setCurrentJobQueue

      void setCurrentJobQueue(int count)
    • getStatistics

      Statistics getStatistics()
    • evictAll

      void evictAll()
    • close

      void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable