org.opennms.core.concurrent
Class PausibleScheduledThreadPoolExecutor

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by java.util.concurrent.ScheduledThreadPoolExecutor
              extended by org.opennms.core.concurrent.PausibleScheduledThreadPoolExecutor
All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService

public class PausibleScheduledThreadPoolExecutor
extends ScheduledThreadPoolExecutor

PausibleScheduledThreadPoolExecutor

Version:
$Id: $
Author:
Mathew Brozowski

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
 
Constructor Summary
PausibleScheduledThreadPoolExecutor(int corePoolSize)
          Constructor for PausibleScheduledThreadPoolExecutor.
 
Method Summary
protected  void beforeExecute(Thread t, Runnable r)
          
 boolean isPaused()
          isPaused
 void pause()
          pause
 void resume()
          resume
 
Methods inherited from class java.util.concurrent.ScheduledThreadPoolExecutor
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, remove, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, shutdown, shutdownNow, submit, submit, submit
 
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, 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, 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

PausibleScheduledThreadPoolExecutor

public PausibleScheduledThreadPoolExecutor(int corePoolSize)

Constructor for PausibleScheduledThreadPoolExecutor.

Parameters:
corePoolSize - a int.
Method Detail

isPaused

public boolean isPaused()

isPaused

Returns:
a boolean.

beforeExecute

protected void beforeExecute(Thread t,
                             Runnable r)

Overrides:
beforeExecute in class ThreadPoolExecutor

pause

public void pause()

pause


resume

public void resume()

resume



Copyright © 2011. All Rights Reserved.