Class WorkerPoolRunnable

java.lang.Object
com.tenio.common.logger.AbstractLogger
com.tenio.common.worker.WorkerPoolRunnable
All Implemented Interfaces:
Runnable

public final class WorkerPoolRunnable extends AbstractLogger implements Runnable
Worker Poll management class.
  • Constructor Details

    • WorkerPoolRunnable

      public WorkerPoolRunnable(String name, int index, BlockingQueue<Runnable> taskQueue)
      Create a worker pool management.
      Parameters:
      name - the pool's name
      index - the index set to differentiate threads
      taskQueue - a queue of tasks
  • Method Details

    • run

      public void run()
      Start a new thread for a worker pool.
      Specified by:
      run in interface Runnable
    • doStop

      public void doStop()
      Stop the current worker pool.
    • isStopped

      public boolean isStopped()