|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quartz.simpl.ZeroSizeThreadPool
public class ZeroSizeThreadPool
This is class is a simple implementation of a zero size thread pool, based on the
interface.
ThreadPool
The pool has zero Threads and does not grow or shrink based on demand.
Which means it is obviously not useful for most scenarios. When it may be useful
is to prevent creating any worker threads at all - which may be desirable for
the sole purpose of preserving system resources in the case where the scheduler
instance only exists in order to schedule jobs, but which will never execute
jobs (e.g. will never have start() called on it).
| Constructor Summary | |
|---|---|
ZeroSizeThreadPool()
Create a new ZeroSizeThreadPool. |
|
| Method Summary | |
|---|---|
int |
blockForAvailableThreads()
|
org.slf4j.Logger |
getLog()
|
int |
getPoolSize()
|
void |
initialize()
|
boolean |
runInThread(Runnable runnable)
|
void |
setInstanceId(String schedInstId)
|
void |
setInstanceName(String schedName)
|
void |
shutdown()
|
void |
shutdown(boolean waitForJobsToComplete)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZeroSizeThreadPool()
Create a new ZeroSizeThreadPool.
| Method Detail |
|---|
public org.slf4j.Logger getLog()
public int getPoolSize()
getPoolSize in interface org.quartz.spi.ThreadPool
public void initialize()
throws SchedulerConfigException
initialize in interface org.quartz.spi.ThreadPoolSchedulerConfigExceptionpublic void shutdown()
public void shutdown(boolean waitForJobsToComplete)
shutdown in interface org.quartz.spi.ThreadPoolpublic boolean runInThread(Runnable runnable)
runInThread in interface org.quartz.spi.ThreadPoolpublic int blockForAvailableThreads()
blockForAvailableThreads in interface org.quartz.spi.ThreadPoolpublic void setInstanceId(String schedInstId)
setInstanceId in interface org.quartz.spi.ThreadPoolpublic void setInstanceName(String schedName)
setInstanceName in interface org.quartz.spi.ThreadPool
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||