org.kuali.rice.ksb.messaging.threadpool
Class KSBThreadPoolImpl

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by org.kuali.rice.ksb.messaging.threadpool.KSBThreadPoolImpl
All Implemented Interfaces:
Executor, ExecutorService, Lifecycle, KSBThreadPool

public class KSBThreadPoolImpl
extends ThreadPoolExecutor
implements KSBThreadPool

A Thread Pool implementation for the KSB which implements a thread pool backed by a configuration store.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
 
Field Summary
static int DEFAULT_POOL_SIZE
           
 
Constructor Summary
KSBThreadPoolImpl()
           
 
Method Summary
 Object getInstance()
           
 long getKeepAliveTime()
           
 boolean isStarted()
           
protected  void loadSettings()
          Loads the thread pool settings from the DAO.
 void setCorePoolSize(int corePoolSize)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.ksb.messaging.threadpool.KSBThreadPool
getActiveCount, getCompletedTaskCount, getCorePoolSize, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getTaskCount, remove, setMaximumPoolSize
 
Methods inherited from interface java.util.concurrent.ExecutorService
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
 
Methods inherited from interface java.util.concurrent.Executor
execute
 

Field Detail

DEFAULT_POOL_SIZE

public static final int DEFAULT_POOL_SIZE
See Also:
Constant Field Values
Constructor Detail

KSBThreadPoolImpl

public KSBThreadPoolImpl()
Method Detail

setCorePoolSize

public void setCorePoolSize(int corePoolSize)
Specified by:
setCorePoolSize in interface KSBThreadPool
Overrides:
setCorePoolSize in class ThreadPoolExecutor

getKeepAliveTime

public long getKeepAliveTime()
Specified by:
getKeepAliveTime in interface KSBThreadPool

isStarted

public boolean isStarted()
Specified by:
isStarted in interface Lifecycle

start

public void start()
           throws Exception
Specified by:
start in interface Lifecycle
Throws:
Exception

stop

public void stop()
          throws Exception
Specified by:
stop in interface Lifecycle
Throws:
Exception

loadSettings

protected void loadSettings()
Loads the thread pool settings from the DAO.


getInstance

public Object getInstance()
Specified by:
getInstance in interface KSBThreadPool


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.