Class InstrumentedQueuedThreadPool

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.util.thread.QueuedThreadPool
io.micrometer.core.instrument.binder.jetty.InstrumentedQueuedThreadPool
All Implemented Interfaces:
Executor, ThreadFactory, org.eclipse.jetty.util.component.Container, org.eclipse.jetty.util.component.Destroyable, org.eclipse.jetty.util.component.Dumpable, org.eclipse.jetty.util.component.Dumpable.DumpableContainer, org.eclipse.jetty.util.component.LifeCycle, org.eclipse.jetty.util.thread.ThreadPool, org.eclipse.jetty.util.thread.ThreadPool.SizedThreadPool, org.eclipse.jetty.util.thread.TryExecutor

public class InstrumentedQueuedThreadPool extends org.eclipse.jetty.util.thread.QueuedThreadPool
A QueuedThreadPool that binds metrics about the Jetty server thread pool. This can be passed when constructing a Jetty server. For example:

     Server server = new Server(new InstrumentedQueuedThreadPool(registry, Tags.empty()));
     // ...
 
Since:
1.1.0
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container

    org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable

    org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle

    org.eclipse.jetty.util.component.LifeCycle.Listener

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.ThreadPool

    org.eclipse.jetty.util.thread.ThreadPool.SizedThreadPool

    Nested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.TryExecutor

    org.eclipse.jetty.util.thread.TryExecutor.NoTryExecutor
  • Field Summary

    Fields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING

    Fields inherited from interface org.eclipse.jetty.util.component.Dumpable

    KEY

    Fields inherited from interface org.eclipse.jetty.util.thread.TryExecutor

    NO_TRY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default values for the instrumented thread pool.
    InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags, int maxThreads)
    Instrumented thread pool.
    InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags, int maxThreads, int minThreads)
    Instrumented thread pool.
    InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags, int maxThreads, int minThreads, int idleTimeout)
    Instrumented thread pool.
    InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags, int maxThreads, int minThreads, int idleTimeout, BlockingQueue<Runnable> queue)
    Instrumented thread pool.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     

    Methods inherited from class org.eclipse.jetty.util.thread.QueuedThreadPool

    doStop, dump, dumpThread, execute, getAvailableReservedThreads, getBusyThreads, getIdleThreads, getIdleTimeout, getLeasedThreads, getLowThreadsThreshold, getMaxAvailableThreads, getMaxLeasedThreads, getMaxReservedThreads, getMaxThreads, getMinThreads, getName, getQueue, getQueueSize, getReadyThreads, getReservedThreads, getThreadPoolBudget, getThreads, getThreadsPriority, getUtilizationRate, getUtilizedThreads, interruptThread, isDaemon, isDetailedDump, isLowOnThreads, join, newThread, removeThread, runJob, setDaemon, setDetailedDump, setIdleTimeout, setLowThreadsThreshold, setMaxThreads, setMinThreads, setName, setQueue, setReservedThreads, setThreadPoolBudget, setThreadsPriority, startThread, toString, tryExecute

    Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle

    addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans

    Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle

    addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable

    dump, dumpSelf

    Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer

    isDumpable
  • Constructor Details

    • InstrumentedQueuedThreadPool

      public InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags)
      Default values for the instrumented thread pool.
      Parameters:
      registry - where metrics will be bound
      tags - tags to apply to metrics bound from this
    • InstrumentedQueuedThreadPool

      public InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags, int maxThreads)
      Instrumented thread pool.
      Parameters:
      registry - where metrics will be bound
      tags - tags to apply to metrics bound from this
      maxThreads - maximum threads for the thread pool
      Since:
      1.5.0
    • InstrumentedQueuedThreadPool

      public InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags, int maxThreads, int minThreads)
      Instrumented thread pool.
      Parameters:
      registry - where metrics will be bound
      tags - tags to apply to metrics bound from this
      maxThreads - maximum threads for the thread pool
      minThreads - minimum threads for the thread pool
      Since:
      1.5.0
    • InstrumentedQueuedThreadPool

      public InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags, int maxThreads, int minThreads, int idleTimeout)
      Instrumented thread pool.
      Parameters:
      registry - where metrics will be bound
      tags - tags to apply to metrics bound from this
      maxThreads - maximum threads for the thread pool
      minThreads - minimum threads for the thread pool
      idleTimeout - timeout for idle threads in pool
      Since:
      1.5.0
    • InstrumentedQueuedThreadPool

      public InstrumentedQueuedThreadPool(MeterRegistry registry, Iterable<Tag> tags, int maxThreads, int minThreads, int idleTimeout, BlockingQueue<Runnable> queue)
      Instrumented thread pool.
      Parameters:
      registry - where metrics will be bound
      tags - tags to apply to metrics bound from this
      maxThreads - maximum threads for the thread pool
      minThreads - minimum threads for the thread pool
      idleTimeout - timeout for idle threads in pool
      queue - backing queue for thread pool tasks
      Since:
      1.5.0
  • Method Details

    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.eclipse.jetty.util.thread.QueuedThreadPool
      Throws:
      Exception