Spring Framework

org.springframework.scheduling.quartz
Class LocalTaskExecutorThreadPool

java.lang.Object
  extended by org.springframework.scheduling.quartz.LocalTaskExecutorThreadPool
All Implemented Interfaces:
org.quartz.spi.ThreadPool

public class LocalTaskExecutorThreadPool
extends java.lang.Object
implements org.quartz.spi.ThreadPool

Quartz ThreadPool adapter that delegates to a Spring-managed TaskExecutor instance, specified on SchedulerFactoryBean.

Since:
2.0
Author:
Juergen Hoeller
See Also:
SchedulerFactoryBean.setTaskExecutor(java.util.concurrent.Executor)

Field Summary
protected  org.apache.commons.logging.Log logger
          Logger available to subclasses
 
Constructor Summary
LocalTaskExecutorThreadPool()
           
 
Method Summary
 int blockForAvailableThreads()
           
 int getPoolSize()
           
 void initialize()
           
 boolean runInThread(java.lang.Runnable runnable)
           
 void setInstanceId(java.lang.String schedInstId)
           
 void setInstanceName(java.lang.String schedName)
           
 void shutdown(boolean waitForJobsToComplete)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Logger available to subclasses

Constructor Detail

LocalTaskExecutorThreadPool

public LocalTaskExecutorThreadPool()
Method Detail

setInstanceId

public void setInstanceId(java.lang.String schedInstId)

setInstanceName

public void setInstanceName(java.lang.String schedName)

initialize

public void initialize()
                throws org.quartz.SchedulerConfigException
Specified by:
initialize in interface org.quartz.spi.ThreadPool
Throws:
org.quartz.SchedulerConfigException

shutdown

public void shutdown(boolean waitForJobsToComplete)
Specified by:
shutdown in interface org.quartz.spi.ThreadPool

getPoolSize

public int getPoolSize()
Specified by:
getPoolSize in interface org.quartz.spi.ThreadPool

runInThread

public boolean runInThread(java.lang.Runnable runnable)
Specified by:
runInThread in interface org.quartz.spi.ThreadPool

blockForAvailableThreads

public int blockForAvailableThreads()
Specified by:
blockForAvailableThreads in interface org.quartz.spi.ThreadPool

Spring Framework