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 registeredQueueItemMetricsListener
instances.static void
Notify all listeners about the cancellation of an item.static void
Notify all listeners about an item having finished execution.static void
Notify all listeners about the enqueuing of an item.static void
Notify all listeners about an item having started execution.void
onCancelled
(QueueItemMetricsEvent event) Called at most once for eachQueue.Item
some time after it is cancelled from the queue.void
onFinished
(QueueItemMetricsEvent event) Called at most once for eachQueue.Item
some time after it finishes executing.void
onQueued
(QueueItemMetricsEvent event) Called at most once for eachQueue.Item
some time after it enters the queue.void
onStarted
(QueueItemMetricsEvent event) Called at most once for eachQueue.Item
some time after it leaves the queue and starts executing.
-
Constructor Details
-
QueueItemMetricsListener
public QueueItemMetricsListener()
-
-
Method Details
-
onQueued
Called at most once for eachQueue.Item
some time after it enters the queue.- Parameters:
event
- the event.
-
onCancelled
Called at most once for eachQueue.Item
some time after it is cancelled from the queue.- Parameters:
event
- the event.
-
onStarted
Called at most once for eachQueue.Item
some time after it leaves the queue and starts executing.- Parameters:
event
- the event.
-
onFinished
Called at most once for eachQueue.Item
some time after it finishes executing.- Parameters:
event
- the event.
-
all
All the registeredQueueItemMetricsListener
instances.- Returns:
- all the registered
QueueItemMetricsListener
instances.
-
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.
-