net.spy.concurrent
Class TrackingScheduledExecutor

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by java.util.concurrent.ScheduledThreadPoolExecutor
              extended by net.spy.concurrent.TrackingScheduledExecutor
All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService

public class TrackingScheduledExecutor
extends ScheduledThreadPoolExecutor

ScheduledExecutorServer that uses WorkerThreads to track what's beging executed.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
 
Constructor Summary
TrackingScheduledExecutor(int maxThreads, RejectedExecutionHandler reject, ThreadGroup tg, String name)
          Get a TrackingScheduledExecutor.
TrackingScheduledExecutor(int maxThreads, ThreadGroup tg, String name)
          Get a TrackingScheduledExecutor.
 
Method Summary
protected  void afterExecute(Runnable r, Throwable t)
           
protected  void beforeExecute(Thread t, Runnable r)
           
 
Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor
execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, remove, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, shutdown, shutdownNow, submit, submit, submit
 
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny
 
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

TrackingScheduledExecutor

public TrackingScheduledExecutor(int maxThreads,
                                 RejectedExecutionHandler reject,
                                 ThreadGroup tg,
                                 String name)
Get a TrackingScheduledExecutor.

Parameters:
maxThreads - core pool size
reject - the rejected execution handler
tg - the thread group in which the threads should be created
name - the name of of the threads

TrackingScheduledExecutor

public TrackingScheduledExecutor(int maxThreads,
                                 ThreadGroup tg,
                                 String name)
Get a TrackingScheduledExecutor.

Parameters:
maxThreads - core pool size
tg - the thread group in which the threads should be created
name - the name of of the threads
Method Detail

beforeExecute

protected void beforeExecute(Thread t,
                             Runnable r)
Overrides:
beforeExecute in class ThreadPoolExecutor

afterExecute

protected void afterExecute(Runnable r,
                            Throwable t)
Overrides:
afterExecute in class ThreadPoolExecutor


Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.