Class QueueItemMetricsListener

java.lang.Object
jenkins.metrics.api.QueueItemMetricsListener
All Implemented Interfaces:
ExtensionPoint

public abstract class QueueItemMetricsListener extends Object implements ExtensionPoint
Receives details of metrics events about queue items.
  • Constructor Details

    • QueueItemMetricsListener

      public QueueItemMetricsListener()
  • Method Details

    • onQueued

      public void onQueued(QueueItemMetricsEvent event)
      Called at most once for each Queue.Item some time after it enters the queue.
      Parameters:
      event - the event.
    • onCancelled

      public void onCancelled(QueueItemMetricsEvent event)
      Called at most once for each Queue.Item some time after it is cancelled from the queue.
      Parameters:
      event - the event.
    • onStarted

      public void onStarted(QueueItemMetricsEvent event)
      Called at most once for each Queue.Item some time after it leaves the queue and starts executing.
      Parameters:
      event - the event.
    • onFinished

      public void onFinished(QueueItemMetricsEvent event)
      Called at most once for each Queue.Item some time after it finishes executing.
      Parameters:
      event - the event.
    • all

      All the registered QueueItemMetricsListener instances.
      Returns:
      all the registered QueueItemMetricsListener instances.
    • notifyQueued

      public static void notifyQueued(QueueItemMetricsEvent event)
      Notify all listeners about the enqueuing of an item.
      Parameters:
      event - the event.
    • notifyCancelled

      public static void notifyCancelled(QueueItemMetricsEvent event)
      Notify all listeners about the cancellation of an item.
      Parameters:
      event - the event.
    • notifyStarted

      public static void notifyStarted(QueueItemMetricsEvent event)
      Notify all listeners about an item having started execution.
      Parameters:
      event - the event.
    • notifyFinished

      public static void notifyFinished(QueueItemMetricsEvent event)
      Notify all listeners about an item having finished execution.
      Parameters:
      event - the event.