diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ScheduledExecutorScheduler.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ScheduledExecutorScheduler.java index 8519e08c464..931936239cb 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ScheduledExecutorScheduler.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/ScheduledExecutorScheduler.java @@ -25,6 +25,8 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import org.eclipse.jetty.util.StringUtil; +import org.eclipse.jetty.util.annotation.ManagedAttribute; +import org.eclipse.jetty.util.annotation.ManagedObject; import org.eclipse.jetty.util.annotation.Name; import org.eclipse.jetty.util.component.AbstractLifeCycle; import org.eclipse.jetty.util.component.Dumpable; @@ -37,6 +39,7 @@ import org.eclipse.jetty.util.component.Dumpable; * queue even if the task did not fire, which provides a huge benefit in the performance * of garbage collection in young generation. */ +@ManagedObject public class ScheduledExecutorScheduler extends AbstractLifeCycle implements Scheduler, Dumpable { private final String name; @@ -154,4 +157,22 @@ public class ScheduledExecutorScheduler extends AbstractLifeCycle implements Sch return scheduledFuture.cancel(false); } } + + @ManagedAttribute("The name of the scheduler") + public String getName() + { + return name; + } + + @ManagedAttribute("Whether the scheduler uses daemon threads") + public boolean isDaemon() + { + return daemon; + } + + @ManagedAttribute("The number of scheduler threads") + public int getThreads() + { + return threads; + } }