Class ScheduledExecutorScheduler

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.thread.ScheduledExecutorScheduler
All Implemented Interfaces:
Dumpable, LifeCycle, Scheduler

@ManagedObject public class ScheduledExecutorScheduler extends AbstractLifeCycle implements Scheduler, Dumpable
Implementation of Scheduler based on JDK's ScheduledThreadPoolExecutor.

While use of ScheduledThreadPoolExecutor creates futures that will not be used, it has the advantage of allowing to set a property to remove cancelled tasks from its queue even if the task did not fire, which provides a huge benefit in the performance of garbage collection in young generation.