@Override public String getJmxName() { return threadPool.getConfig().getPoolName(); }
@Override public String getJmxName() { return threadPool.getConfig().getPoolName(); }
@Override public void onTaskCancelEvent(AbstractThreadPool threadPool, Runnable task) { // when dequeued task is cancelled - we have to "return" the thread, that // we marked as dispatched from the pool grizzlyMonitoring.getThreadPoolProbeProvider().threadReturnedToPoolEvent( monitoringId, threadPool.getConfig().getPoolName(), Thread.currentThread().getId()); }
@Override public void onTaskCompleteEvent(AbstractThreadPool threadPool, Runnable task) { grizzlyMonitoring.getThreadPoolProbeProvider().threadReturnedToPoolEvent( monitoringId, threadPool.getConfig().getPoolName(), Thread.currentThread().getId()); }
@Override public void onThreadReleaseEvent(AbstractThreadPool threadPool, Thread thread) { grizzlyMonitoring.getThreadPoolProbeProvider().threadReleasedEvent( monitoringId, threadPool.getConfig().getPoolName(), thread.getId()); }
@Override public void onTaskDequeueEvent(AbstractThreadPool threadPool, Runnable task) { grizzlyMonitoring.getThreadPoolProbeProvider().threadDispatchedFromPoolEvent( monitoringId, threadPool.getConfig().getPoolName(), Thread.currentThread().getId()); grizzlyMonitoring.getConnectionQueueProbeProvider().onTaskDequeuedEvent( monitoringId, task.getClass().getName()); }
@Override public void onThreadAllocateEvent(AbstractThreadPool threadPool, Thread thread) { grizzlyMonitoring.getThreadPoolProbeProvider().threadAllocatedEvent( monitoringId, threadPool.getConfig().getPoolName(), thread.getId()); }
@Override public void onMaxNumberOfThreadsEvent(AbstractThreadPool threadPool, int maxNumberOfThreads) { grizzlyMonitoring.getThreadPoolProbeProvider().maxNumberOfThreadsReachedEvent( monitoringId, threadPool.getConfig().getPoolName(), maxNumberOfThreads); }
/** * @return the core size of this thread pool. */ @ManagedAttribute(id="thread-pool-core-pool-size") @Description("The initial/minimum number of threads managed by this thread pool.") public int getCorePoolSize() { return threadPool.getConfig().getCorePoolSize(); }
/** * @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(); }
/** * @return the core size of this thread pool. */ @ManagedAttribute(id="thread-pool-core-pool-size") @Description("The initial/minimum number of threads managed by this thread pool.") public int getCorePoolSize() { return threadPool.getConfig().getCorePoolSize(); }
} else { selectorPoolSize = Math.min( ((AbstractThreadPool) workerThreadPool).getConfig() .getMaxPoolSize(), selectorPoolSize);
} else { selectorPoolSize = Math.min( ((AbstractThreadPool) workerThreadPool).getConfig() .getMaxPoolSize(), selectorPoolSize);
} else { selectorPoolSize = Math.min( ((AbstractThreadPool) workerThreadPool).getConfig() .getMaxPoolSize(), selectorPoolSize);
} else { selectorPoolSize = Math.min( ((AbstractThreadPool) workerThreadPool).getConfig() .getMaxPoolSize(), selectorPoolSize);
} else { selectorPoolSize = Math.min( ((AbstractThreadPool) workerThreadPool).getConfig() .getMaxPoolSize(), selectorPoolSize);
} else { selectorPoolSize = Math.min( ((AbstractThreadPool) workerThreadPool).getConfig() .getMaxPoolSize(), selectorPoolSize);
} else { selectorPoolSize = Math.min( ((AbstractThreadPool) workerThreadPool).getConfig() .getMaxPoolSize(), selectorPoolSize);
} else { selectorPoolSize = Math.min( ((AbstractThreadPool) workerThreadPool).getConfig() .getMaxPoolSize(), selectorPoolSize);