Class WorkerExecutor

  • All Implemented Interfaces:
    java.lang.Runnable

    public class WorkerExecutor
    extends java.lang.Object
    implements java.lang.Runnable
    manage one worker with n thread
    • Constructor Summary

      Constructors 
      Constructor Description
      WorkerExecutor​(java.util.concurrent.BlockingQueue<java.lang.Runnable> queue, WorkerBean workerBean)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      WorkerBean getWorkerBean()  
      void run()  
      void stop()
      send a message to notify all thread that the worker will be stop.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkerExecutor

        public WorkerExecutor​(java.util.concurrent.BlockingQueue<java.lang.Runnable> queue,
                              WorkerBean workerBean)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • stop

        public void stop()
        send a message to notify all thread that the worker will be stop.
      • getWorkerBean

        public WorkerBean getWorkerBean()