Package l2p.common.ThreadPoolManager

Examples of l2p.common.ThreadPoolManager.PriorityThreadFactory


          break;
        case admin_set_packet_pool:
          ThreadPoolExecutor newPool;
          if("1".equals(wordList[1]))
          {
            newPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 15L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), new PriorityThreadFactory("Normal Packet Pool", Thread.NORM_PRIORITY + 2));
            activeChar.sendMessage("Switching GeneralPackets ThreadPool to SynchronousQueue");
          }
          else if("2".equals(wordList[1]))
          {
            newPool = new ThreadPoolExecutor(Config.GENERAL_PACKET_THREAD_CORE_SIZE, Config.GENERAL_PACKET_THREAD_CORE_SIZE * 2, 120L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new PriorityThreadFactory("Normal Packet Pool", Thread.NORM_PRIORITY + 2));
            activeChar.sendMessage("Switching GeneralPackets ThreadPool to LinkedBlockingQueue");
          }
          else
          {
            activeChar.sendMessage("USAGE: set_packet_pool 1|2 [forceshutdown]");
View Full Code Here


{
  private ThreadPoolExecutor executor;

  public ParallelExecutor(String name, int prio, int cores)
  {
    executor = new ThreadPoolExecutor(cores, cores, 1, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new PriorityThreadFactory(name, prio));
  }
View Full Code Here

TOP

Related Classes of l2p.common.ThreadPoolManager.PriorityThreadFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.