public int getMaxThreads() { return getMaximumPoolSize(); }
public long getKeepAliveTime() { return getKeepAliveTime(TimeUnit.MILLISECONDS); }
public void setKeepAliveTime(final long milliseconds) { setKeepAliveTime(milliseconds, TimeUnit.MILLISECONDS); }
@Override public long getNumberOfFreeThreads() { if (realExecutor instanceof JBossThreadPoolExecutor) { return ((JBossThreadPoolExecutor) realExecutor).getMaximumPoolSize() - ((JBossThreadPoolExecutor) realExecutor).getActiveCount(); } else if (realExecutor instanceof ThreadPoolExecutorMBean) { return ((ThreadPoolExecutorMBean) realExecutor).getMaxThreads() - ((ThreadPoolExecutorMBean) realExecutor).getCurrentThreadCount(); } else if (realExecutor instanceof ManagedQueueExecutorService) { return ((ManagedQueueExecutorService) realExecutor).getMaxThreads() - ((ManagedQueueExecutorService) realExecutor).getCurrentThreadCount(); } else if (realExecutor instanceof ManagedJBossThreadPoolExecutorService) { return ((ManagedJBossThreadPoolExecutorService) realExecutor).getMaxThreads() - ((ManagedJBossThreadPoolExecutorService) realExecutor).getCurrentThreadCount(); } else if (realExecutor instanceof ManagedQueuelessExecutorService) { return ((ManagedQueuelessExecutorService) realExecutor).getMaxThreads() - ((ManagedQueuelessExecutorService) realExecutor).getCurrentThreadCount(); } else if (realExecutor instanceof ManagedScheduledExecutorService) { return ((ManagedScheduledExecutorService) realExecutor).getLargestPoolSize() - ((ManagedScheduledExecutorService) realExecutor).getActiveCount(); } else { return 0; } } }
public int getActiveCount() { return executor.getActiveCount(); }
/** {@inheritDoc} */ public int getQueueSize() { return this.getQueue().size(); }
public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) { rejectCount.incrementAndGet(); if (isShutdown()) { throw Messages.msg.shutDownInitiated(); } delegate.rejectedExecution(r, executor); } }
public int getCoreThreads() { return getCorePoolSize(); }
public boolean isAllowCoreThreadTimeout() { return allowsCoreThreadTimeOut(); }
public void setAllowCoreThreadTimeout(final boolean allow) { allowCoreThreadTimeOut(allow); }
public int getCurrentThreadCount() { return getPoolSize(); }
@Override public long getNumberOfFreeThreads() { if (realExecutor instanceof JBossThreadPoolExecutor) { return ((JBossThreadPoolExecutor) realExecutor).getMaximumPoolSize() - ((JBossThreadPoolExecutor) realExecutor).getActiveCount(); } else if (realExecutor instanceof ThreadPoolExecutorMBean) { return ((ThreadPoolExecutorMBean) realExecutor).getMaxThreads() - ((ThreadPoolExecutorMBean) realExecutor).getCurrentThreadCount(); } else { return 0; } } }
/** {@inheritDoc} */ public int getQueueSize() { return this.getQueue().size(); }
public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) { rejectCount.incrementAndGet(); if (isShutdown()) { throw Messages.msg.shutDownInitiated(); } delegate.rejectedExecution(r, executor); } }
public int getCoreThreads() { return getCorePoolSize(); }
public boolean isAllowCoreThreadTimeout() { return allowsCoreThreadTimeOut(); }
public void setAllowCoreThreadTimeout(final boolean allow) { allowCoreThreadTimeOut(allow); }
public int getCurrentThreadCount() { return getPoolSize(); }
@Override public long getNumberOfFreeThreads() { if (realExecutor instanceof JBossThreadPoolExecutor) { return ((JBossThreadPoolExecutor) realExecutor).getMaximumPoolSize() - ((JBossThreadPoolExecutor) realExecutor).getActiveCount(); } else if (realExecutor instanceof ThreadPoolExecutorMBean) { return ((ThreadPoolExecutorMBean) realExecutor).getMaxThreads() - ((ThreadPoolExecutorMBean) realExecutor).getCurrentThreadCount(); } else if (realExecutor instanceof ManagedQueueExecutorService) { return ((ManagedQueueExecutorService) realExecutor).getMaxThreads() - ((ManagedQueueExecutorService) realExecutor).getCurrentThreadCount(); } else if (realExecutor instanceof ManagedJBossThreadPoolExecutorService) { return ((ManagedJBossThreadPoolExecutorService) realExecutor).getMaxThreads() - ((ManagedJBossThreadPoolExecutorService) realExecutor).getCurrentThreadCount(); } else if (realExecutor instanceof ManagedQueuelessExecutorService) { return ((ManagedQueuelessExecutorService) realExecutor).getMaxThreads() - ((ManagedQueuelessExecutorService) realExecutor).getCurrentThreadCount(); } else if (realExecutor instanceof ManagedScheduledExecutorService) { return ((ManagedScheduledExecutorService) realExecutor).getLargestPoolSize() - ((ManagedScheduledExecutorService) realExecutor).getActiveCount(); } else { return 0; } } }
public int getMaxThreads() { return getMaximumPoolSize(); }