Interface JobWorkerMetrics
- All Known Implementing Classes:
MicrometerJobWorkerMetrics
public interface JobWorkerMetrics
Worker metrics API. Allows basic instrumenting of job activation and handling.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
jobActivated
(int count) Called every time one or more jobs are activated.default void
jobHandled
(int count) Called every time one or more jobs are handled.Returns a new builder for the Micrometer bridge.static JobWorkerMetrics
noop()
Returns an implementation which does nothing.
-
Method Details
-
jobActivated
default void jobActivated(int count) Called every time one or more jobs are activated.NOTE: this is called before the job is worked on.
- Parameters:
count
- the amount of jobs that were activated
-
jobHandled
default void jobHandled(int count) Called every time one or more jobs are handled.NOTE: this is called after a job has been worked on, successfully or not.
- Parameters:
count
- the amount of jobs that were handled
-
micrometer
Returns a new builder for the Micrometer bridge.- Throws:
UnsupportedOperationException
- if Micrometer is not found in the class path
-
noop
Returns an implementation which does nothing.
-