private int maxThreadPoolSize() { Collection<NetworkListener> listeners = this.httpServer.getListeners(); if (listeners.size() == 0) { return -1; } return listeners.iterator().next().getTransport() .getWorkerThreadPoolConfig().getMaxPoolSize(); }
protected void poisonAll() { int size = Math.max(config.getMaxPoolSize(), workers.size()) * 4 / 3; final Queue<Runnable> q = getQueue(); while (size-- > 0) { q.offer(poison); } }
protected void poisonAll() { int size = Math.max(config.getMaxPoolSize(), workers.size()) * 4 / 3; final Queue<Runnable> q = getQueue(); while (size-- > 0) { q.offer(poison); } }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
protected void poisonAll() { int size = Math.max(config.getMaxPoolSize(), workers.size()) * 4 / 3; final Queue<Runnable> q = getQueue(); while (size-- > 0) { q.offer(poison); } }
protected void poisonAll() { int size = Math.max(config.getMaxPoolSize(), workers.size()) * 4 / 3; final Queue<Runnable> q = getQueue(); while (size-- > 0) { q.offer(poison); } }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
protected void poisonAll() { int size = Math.max(config.getMaxPoolSize(), workers.size()) * 4 / 3; final Queue<Runnable> q = getQueue(); while (size-- > 0) { q.offer(poison); } }
protected void poisonAll() { int size = Math.max(config.getMaxPoolSize(), workers.size()) * 4 / 3; final Queue<Runnable> q = getQueue(); while (size-- > 0) { q.offer(poison); } }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
/** * Method is called by <tt>AbstractThreadPool</tt>, when maximum number of * worker threads is reached and task will need to wait in task queue, until * one of the threads will be able to process it. */ protected void onMaxNumberOfThreadsReached() { ProbeNotifier.notifyMaxNumberOfThreads(this, config.getMaxPoolSize()); }
protected void poisonAll() { int size = Math.max(config.getMaxPoolSize(), workers.size()) * 4 / 3; final Queue<Runnable> q = getQueue(); while (size-- > 0) { q.offer(poison); } }
/** * @return the max number of threads allowed by this thread pool. */ @ManagedAttribute(id="thread-pool-max-num-threads") @Description("The maximum number of the threads allowed by this thread pool.") public int getMaxAllowedThreads() { return threadPool.getConfig().getMaxPoolSize(); }
/** * @return the max number of threads allowed by this thread pool. */ @ManagedAttribute(id="thread-pool-max-num-threads") @Description("The maximum number of the threads allowed by this thread pool.") public int getMaxAllowedThreads() { return threadPool.getConfig().getMaxPoolSize(); }
@Reset public void reset() { if (threadPoolConfig != null) { maxThreadsCount.setCount(threadPoolConfig.getMaxPoolSize()); coreThreadsCount.setCount(threadPoolConfig.getCorePoolSize()); currentThreadCount.setCount(0); currentThreadsBusy.setCount(0); } totalExecutedTasksCount.setCount(0); } }