Class ScheduledTaskObservationContext
java.lang.Object
io.micrometer.observation.Observation.Context
org.springframework.scheduling.support.ScheduledTaskObservationContext
- All Implemented Interfaces:
- io.micrometer.observation.Observation.ContextView
public class ScheduledTaskObservationContext
extends io.micrometer.observation.Observation.Context
Context that holds information for observation metadata collection during the
 
execution of scheduled tasks.- Since:
- 6.1
- Author:
- Brian Clozel
- 
Constructor SummaryConstructorsConstructorDescriptionScheduledTaskObservationContext(Object target, Method method) Create a new observation context for a task, given the target object and the method to be called.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the method that is called for task execution.Class<?>Return the type of the target object.booleanReturn whether the task execution is complete.voidsetComplete(boolean complete) Set whether the task execution has completed.Methods inherited from class io.micrometer.observation.Observation.ContextaddHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micrometer.observation.Observation.ContextViewgetOrDefault
- 
Constructor Details- 
ScheduledTaskObservationContextCreate a new observation context for a task, given the target object and the method to be called.- Parameters:
- target- the target object that is called for task execution
- method- the method that is called for task execution
 
 
- 
- 
Method Details- 
getTargetClassReturn the type of the target object.
- 
getMethodReturn the method that is called for task execution.
- 
isCompletepublic boolean isComplete()Return whether the task execution is complete.If an observation has ended and the task is not complete, this means that an errorwas raised or that the task execution got cancelled during its execution.
- 
setCompletepublic void setComplete(boolean complete) Set whether the task execution has completed.
 
-