Examples of PriorityThreadFactory


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

Examples of l2p.common.ThreadPoolManager.PriorityThreadFactory

{
  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

Examples of lineage2.commons.threading.PriorityThreadFactory

  /**
   * Constructor for ThreadPoolManager.
   */
  private ThreadPoolManager()
  {
    _scheduledExecutor = new ScheduledThreadPoolExecutor(Config.SCHEDULED_THREAD_POOL_SIZE, new PriorityThreadFactory("ScheduledThreadPool", Thread.NORM_PRIORITY), new LoggingRejectedExecutionHandler());
    _executor = new ThreadPoolExecutor(Config.EXECUTOR_THREAD_POOL_SIZE, Integer.MAX_VALUE, 5L, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new PriorityThreadFactory("ThreadPoolExecutor", Thread.NORM_PRIORITY), new LoggingRejectedExecutionHandler());
    scheduleAtFixedRate(new RunnableImpl()
    {
      @Override
      public void runImpl()
      {
View Full Code Here

Examples of org.jasig.portal.utils.threading.PriorityThreadFactory

     */
    public ThreadFiringStatsRecorder(int initialThreads, int maxThreads, int threadPriority) {
        this.threadPool
            = new ThreadPoolExecutor(initialThreads, maxThreads, 0L,
                    TimeUnit.MILLISECONDS, new LinkedBlockingQueue(),
                    new PriorityThreadFactory(threadPriority));
   
View Full Code Here

Examples of org.jasig.portal.utils.threading.PriorityThreadFactory

                "threadPool_shared = " + sharedPool,
                x
                );
        }

        cErrorThreadPool = new ThreadPoolExecutor(20, 20, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new PriorityThreadFactory(threadPriority, "ErrorRendering", PortalSessionManager.getThreadGroup()));

       
        if( sharedPool )
        {
            cSharedThreadPool = new ChannelRenderThreadPoolExecutor(activeThreads, maxActiveThreads, initialThreads, maxThreads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new PriorityThreadFactory(threadPriority, keyBase, PortalSessionManager.getThreadGroup()));
        }
        else
        {
            this.mThreadPool = new ChannelRenderThreadPoolExecutor(activeThreads, maxActiveThreads, initialThreads, maxThreads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new PriorityThreadFactory(threadPriority, keyBase, PortalSessionManager.getThreadGroup()));
        }
    }
View Full Code Here

Examples of org.jasig.portal.utils.threading.PriorityThreadFactory

  private int threadPriority = DEFAULT_THREAD_PRIORITY;

  protected void afterPropertiesSetInternal() throws Exception {
    this.threadPool = new ThreadPoolExecutor(initialThreads, maxThreads,
        0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(),
        new PriorityThreadFactory(threadPriority, "Priority", PortalSessionManager.getThreadGroup()));
  }
View Full Code Here

Examples of org.jasig.portal.utils.threading.PriorityThreadFactory

                );
        }

        if( sharedPool )
        {
            cSharedThreadPool = new ThreadPoolExecutor(initialThreads, maxThreads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new PriorityThreadFactory(threadPriority));
        }
        else
        {
            this.mThreadPool = new ThreadPoolExecutor(initialThreads, maxThreads, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new PriorityThreadFactory(threadPriority));
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.