Class NaruSchedulerImpl

java.lang.Object
net.thevpc.naru.impl.engine.scheduler.NaruSchedulerImpl
All Implemented Interfaces:
NaruScheduler

public class NaruSchedulerImpl extends Object implements NaruScheduler
  • Constructor Details

    • NaruSchedulerImpl

      public NaruSchedulerImpl(NaruSession session)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface NaruScheduler
    • reloadState

      public void reloadState()
    • awaitTermination

      public void awaitTermination()
      Specified by:
      awaitTermination in interface NaruScheduler
    • awaitTermination

      public void awaitTermination(long timeout)
      Specified by:
      awaitTermination in interface NaruScheduler
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface NaruScheduler
    • hold

      public void hold()
      Specified by:
      hold in interface NaruScheduler
    • resume

      public void resume()
      Specified by:
      resume in interface NaruScheduler
    • parkForStopTheWorld

      public boolean parkForStopTheWorld()
      Steps this thread out of its tick so a stop-the-world issued from inside that tick can complete. The tick is resumed by unparkAfterStopTheWorld(boolean) once the action it is waiting on has run.
      Returns:
      this thread was ticking, and so must be put back
    • unparkAfterStopTheWorld

      public void unparkAfterStopTheWorld(boolean wasTicking)
      Re-enters the tick left by parkForStopTheWorld().
    • onUnhold

      public void onUnhold(long tid)
    • isHeld

      public boolean isHeld()
      Specified by:
      isHeld in interface NaruScheduler
    • onTerminated

      public void onTerminated(long tid)
    • tick

      public void tick(long tid)
      Specified by:
      tick in interface NaruScheduler
    • stepAny

      public void stepAny()
      Specified by:
      stepAny in interface NaruScheduler
    • step

      public void step(long... tids)
      Specified by:
      step in interface NaruScheduler
    • stepAll

      public void stepAll()
      Specified by:
      stepAll in interface NaruScheduler
    • runRetention

      public void runRetention()
      Specified by:
      runRetention in interface NaruScheduler
    • runBlockedDrain

      public void runBlockedDrain()
      Specified by:
      runBlockedDrain in interface NaruScheduler
    • requeue

      public void requeue(NaruTask task)
    • onTaskStatusChanged

      public void onTaskStatusChanged(NaruTask task)
    • enqueue

      public void enqueue(NaruTask task)
    • ready

      public void ready(long id)
    • status

      public NaruSchedulerStatus status()
      Specified by:
      status in interface NaruScheduler
    • workerCount

      public int workerCount()
      Specified by:
      workerCount in interface NaruScheduler
    • activeCount

      public int activeCount()
      Specified by:
      activeCount in interface NaruScheduler
    • readyCount

      public int readyCount()
      Specified by:
      readyCount in interface NaruScheduler