Class ConnectionScheduler

java.lang.Object
com.fishlib.io.sched.JobScheduler
com.illumon.util.net.ConnectionScheduler
All Implemented Interfaces:
com.fishlib.io.sched.Scheduler

public class ConnectionScheduler
extends JobScheduler
Create a private scheduler to handle jobs for a single connection.
  • Constructor Details

    • ConnectionScheduler

      public ConnectionScheduler​(@NotNull String name, @NotNull com.fishlib.io.logger.Logger log, @NotNull JobScheduler.Statistics statistics, int numThreads) throws IOException
      Construct a new scheduler designed for use by a single connection, with the supplied name, log, and number of driver threads.
      Parameters:
      name - The name of the scheduler
      log - The log to be used by the scheduler
      statistics - Statistics to be reported by the super class
      numThreads - The number of driver threads to create
      Throws:
      IOException
  • Method Details

    • updateDriverThreadNames

      public void updateDriverThreadNames​(@NotNull String namePrefix)
      Update the names of the driver threads with a new name prefix, replacing the scheduler's name as a component of the driver thread names. Does not change the name of the scheduler, which becomes fixed at construction time.
      Parameters:
      namePrefix - The new name prefix
    • delegatedClose

      protected void delegatedClose()
      Description copied from class: JobScheduler
      Allow derived implementations to do additional closing work. Will be called from JobScheduler.close() only if closing work is done in this implementation.
      Overrides:
      delegatedClose in class JobScheduler
    • getLog

      public com.fishlib.io.logger.Logger getLog()
      Get this scheduler's log
      Returns:
      The log
    • start

      public void start()
      Start this scheduler.