org.jboss.threads
Class JBossScheduledThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ScheduledThreadPoolExecutor
org.jboss.threads.JBossScheduledThreadPoolExecutor
- All Implemented Interfaces:
- Executor, ExecutorService, ScheduledExecutorService, ThreadExecutorMBean, ThreadPoolExecutorMBean, ShutdownListenable
public final class JBossScheduledThreadPoolExecutor
- extends ScheduledThreadPoolExecutor
- implements ThreadPoolExecutorMBean, ShutdownListenable
Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, shutdown, shutdownNow, submit, submit, submit |
Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setMaximumPoolSize, setThreadFactory |
JBossScheduledThreadPoolExecutor
public JBossScheduledThreadPoolExecutor(int corePoolSize)
JBossScheduledThreadPoolExecutor
public JBossScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory)
JBossScheduledThreadPoolExecutor
public JBossScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler)
JBossScheduledThreadPoolExecutor
public JBossScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler)
getKeepAliveTime
public long getKeepAliveTime()
- Specified by:
getKeepAliveTime
in interface ThreadPoolExecutorMBean
setKeepAliveTime
public void setKeepAliveTime(long milliseconds)
- Specified by:
setKeepAliveTime
in interface ThreadPoolExecutorMBean
setKeepAliveTime
public void setKeepAliveTime(long time,
TimeUnit unit)
- Overrides:
setKeepAliveTime
in class ThreadPoolExecutor
getRejectedCount
public int getRejectedCount()
- Specified by:
getRejectedCount
in interface ThreadExecutorMBean
getCurrentThreadCount
public int getCurrentThreadCount()
- Specified by:
getCurrentThreadCount
in interface ThreadExecutorMBean
getLargestThreadCount
public int getLargestThreadCount()
- Specified by:
getLargestThreadCount
in interface ThreadExecutorMBean
getMaxThreads
public int getMaxThreads()
- Specified by:
getMaxThreads
in interface ThreadPoolExecutorMBean
setMaxThreads
public void setMaxThreads(int newSize)
- Specified by:
setMaxThreads
in interface ThreadPoolExecutorMBean
getRejectedExecutionHandler
public RejectedExecutionHandler getRejectedExecutionHandler()
- Overrides:
getRejectedExecutionHandler
in class ThreadPoolExecutor
setRejectedExecutionHandler
public void setRejectedExecutionHandler(RejectedExecutionHandler handler)
- Overrides:
setRejectedExecutionHandler
in class ThreadPoolExecutor
addShutdownListener
public <A> void addShutdownListener(EventListener<A> shutdownListener,
A attachment)
- Add a shutdown listener. If the target object is already shut down, the listener is invoked directly.
- Specified by:
addShutdownListener
in interface ShutdownListenable
- Type Parameters:
A
- the attachment type- Parameters:
shutdownListener
- the listenerattachment
- the attachment value to pass to the listener
terminated
protected void terminated()
- Overrides:
terminated
in class ThreadPoolExecutor
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.