Class SizedScheduledExecutorService

java.lang.Object
org.apache.camel.util.concurrent.SizedScheduledExecutorService
All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService

A sized ScheduledExecutorService which will reject executing tasks if the task queue is full.

The ScheduledThreadPoolExecutor which is the default implementation of the ScheduledExecutorService has unbounded task queue, which mean you can keep scheduling tasks which may cause the system to run out of memory.

This class is a wrapped for ScheduledThreadPoolExecutor to reject executing tasks if an upper limit of the task queue has been reached.