Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.quartz.spi
Interface ThreadPool

All Known Implementing Classes:
  SimpleThreadPool

public interface ThreadPool

The interface to be implemented by classes that want to provide a thread pool for the ``QuartzScheduler``'s use.

Author:
  James House
See Also:
  `QuartzScheduler`

Method Summary
`int` | `getPoolSize()`
`void` | `initialize()` Called by the QuartzScheduler before the `ThreadPool` is used, in order to give the it a chance to initialize.
`boolean` | `runInThread(Runnable runnable)` Execute the given ``Runnable`` in the next available `Thread`.
`void` | `shutdown(boolean waitForJobsToComplete)` Called by the QuartzScheduler to inform the `ThreadPool` that it should free up all of it's resources because the scheduler is shutting down.

Method Detail

### runInThread

    public boolean runInThread(Runnable runnable)

  Execute the given ``Runnable`` in the next available `Thread`.

  The implementation of this interface should not throw exceptions unless there is a serious problem (i.e. a serious misconfiguration). If there are no available threads, rather it should either queue the Runnable, or block until a thread is available, depending on the desired strategy.

### initialize

    public void initialize()
                    throws SchedulerConfigException

  Called by the QuartzScheduler before the `ThreadPool` is used, in order to give the it a chance to initialize.

  Throws:
    `SchedulerConfigException`

### shutdown

    public void shutdown(boolean waitForJobsToComplete)

  Called by the QuartzScheduler to inform the `ThreadPool` that it should free up all of it's resources because the scheduler is shutting down.

### getPoolSize

    public int getPoolSize()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Quartz Enterprise Job Scheduler Project Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD