Package jenkins.metrics.api
Class QueueItemMetricsListener
java.lang.Object
jenkins.metrics.api.QueueItemMetricsListener
- All Implemented Interfaces:
ExtensionPoint
Receives details of metrics events about queue items.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionall()All the registeredQueueItemMetricsListenerinstances.static voidNotify all listeners about the cancellation of an item.static voidNotify all listeners about an item having finished execution.static voidNotify all listeners about the enqueuing of an item.static voidNotify all listeners about an item having started execution.voidonCancelled(QueueItemMetricsEvent event) Called at most once for eachQueue.Itemsome time after it is cancelled from the queue.voidonFinished(QueueItemMetricsEvent event) Called at most once for eachQueue.Itemsome time after it finishes executing.voidonQueued(QueueItemMetricsEvent event) Called at most once for eachQueue.Itemsome time after it enters the queue.voidonStarted(QueueItemMetricsEvent event) Called at most once for eachQueue.Itemsome time after it leaves the queue and starts executing.
-
Constructor Details
-
QueueItemMetricsListener
public QueueItemMetricsListener()
-
-
Method Details
-
onQueued
Called at most once for eachQueue.Itemsome time after it enters the queue.- Parameters:
event- the event.
-
onCancelled
Called at most once for eachQueue.Itemsome time after it is cancelled from the queue.- Parameters:
event- the event.
-
onStarted
Called at most once for eachQueue.Itemsome time after it leaves the queue and starts executing.- Parameters:
event- the event.
-
onFinished
Called at most once for eachQueue.Itemsome time after it finishes executing.- Parameters:
event- the event.
-
all
All the registeredQueueItemMetricsListenerinstances.- Returns:
- all the registered
QueueItemMetricsListenerinstances.
-
notifyQueued
Notify all listeners about the enqueuing of an item.- Parameters:
event- the event.
-
notifyCancelled
Notify all listeners about the cancellation of an item.- Parameters:
event- the event.
-
notifyStarted
Notify all listeners about an item having started execution.- Parameters:
event- the event.
-
notifyFinished
Notify all listeners about an item having finished execution.- Parameters:
event- the event.
-