org.apache.cassandra.concurrent
Class DebuggableScheduledThreadPoolExecutor

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by java.util.concurrent.ScheduledThreadPoolExecutor
              extended by org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor
All Implemented Interfaces:
java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent.ScheduledExecutorService

public final class DebuggableScheduledThreadPoolExecutor
extends java.util.concurrent.ScheduledThreadPoolExecutor

This is a wrapper class for the ScheduledThreadPoolExecutor. It provides an implementation for the afterExecute() found in the ThreadPoolExecutor class to log any unexpected Runtime Exceptions. Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
 
Constructor Summary
DebuggableScheduledThreadPoolExecutor(int threads, java.util.concurrent.ThreadFactory threadFactory)
           
 
Method Summary
 void afterExecute(java.lang.Runnable r, java.lang.Throwable t)
          (non-Javadoc)
 
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
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated
 
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

DebuggableScheduledThreadPoolExecutor

public DebuggableScheduledThreadPoolExecutor(int threads,
                                             java.util.concurrent.ThreadFactory threadFactory)
Method Detail

afterExecute

public void afterExecute(java.lang.Runnable r,
                         java.lang.Throwable t)
(non-Javadoc)

Overrides:
afterExecute in class java.util.concurrent.ThreadPoolExecutor
See Also:
ThreadPoolExecutor.afterExecute(java.lang.Runnable, java.lang.Throwable)


Copyright © 2009 The Apache Software Foundation