JBoss Threads 2.0.0.GA-redhat-2

org.jboss.threads
Class JBossScheduledThreadPoolExecutor

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by java.util.concurrent.ScheduledThreadPoolExecutor
              extended by org.jboss.threads.JBossScheduledThreadPoolExecutor
All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService, ThreadExecutorMBean, ThreadPoolExecutorMBean, ShutdownListenable

public final class JBossScheduledThreadPoolExecutor
extends ScheduledThreadPoolExecutor
implements ThreadPoolExecutorMBean, ShutdownListenable


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
 
Constructor Summary
JBossScheduledThreadPoolExecutor(int corePoolSize)
           
JBossScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler)
           
JBossScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory)
           
JBossScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
           
 
Method Summary
<A> void
addShutdownListener(EventListener<A> shutdownListener, A attachment)
          Add a shutdown listener.
 int getCurrentThreadCount()
           
 long getKeepAliveTime()
           
 int getLargestThreadCount()
           
 int getMaxThreads()
           
 int getRejectedCount()
           
 RejectedExecutionHandler getRejectedExecutionHandler()
           
 void setKeepAliveTime(long milliseconds)
           
 void setKeepAliveTime(long time, TimeUnit unit)
           
 void setMaxThreads(int newSize)
           
 void setRejectedExecutionHandler(RejectedExecutionHandler handler)
           
protected  void terminated()
           
 
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
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated
 

Constructor Detail

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)
Method Detail

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 listener
attachment - the attachment value to pass to the listener

terminated

protected void terminated()
Overrides:
terminated in class ThreadPoolExecutor

JBoss Threads 2.0.0.GA-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.