Class ThreadPoolMetricsSampler

java.lang.Object
org.apache.dubbo.metrics.collector.sample.ThreadPoolMetricsSampler
All Implemented Interfaces:
org.apache.dubbo.common.store.DataStoreUpdateListener, MetricsSampler

public class ThreadPoolMetricsSampler extends Object implements MetricsSampler, org.apache.dubbo.common.store.DataStoreUpdateListener
  • Constructor Details

  • Method Details

    • onUpdate

      public void onUpdate(String componentName, String key, Object value)
      Specified by:
      onUpdate in interface org.apache.dubbo.common.store.DataStoreUpdateListener
    • addExecutors

      public void addExecutors(String name, ExecutorService executorService)
    • sample

      public List<MetricSample> sample()
      Specified by:
      sample in interface MetricsSampler
    • registryDefaultSampleThreadPoolExecutor

      public void registryDefaultSampleThreadPoolExecutor()
    • calSamplesChanged

      public boolean calSamplesChanged()
      Description copied from interface: MetricsSampler
      Check if samples have been changed. Note that this method will reset the changed flag to false using CAS.
      Specified by:
      calSamplesChanged in interface MetricsSampler
      Returns:
      true if samples have been changed