Klasse JobPool

java.lang.Object
ch.nolix.core.programcontrol.jobpool.JobPool

public final class JobPool extends Object
A JobPool runs jobs in the background. A JobPool uses an optimal number of Workers to run several jobs efficiently.
Version:
2019-04-14
Autor:
Silvan Wyss
  • Konstruktordetails

    • JobPool

      public JobPool()
  • Methodendetails

    • enqueue

      public IFuture enqueue(Runnable job)
      Enqueues the given job to the current JobPool.
      Parameter:
      job -
      Gibt zurück:
      a IFuture for the given job.
      Löst aus:
      ArgumentIsNullException - if the given job is null.
    • containsWaitingJobs

      public boolean containsWaitingJobs()
      Gibt zurück:
      true if the current JobPool contains waiting jobs.
    • isIdle

      public boolean isIdle()
      Gibt zurück:
      true if the current JobPool is idle.