Class MicrometerHolder
- java.lang.Object
- 
- org.springframework.kafka.support.micrometer.MicrometerHolder
 
- 
 public final class MicrometerHolder extends java.lang.ObjectA wrapper for micrometer timers when available on the class path.- Since:
- 2.5
- Author:
- Gary Russell
 
- 
- 
Constructor SummaryConstructors Constructor Description MicrometerHolder(org.springframework.context.ApplicationContext context, java.lang.String name, java.lang.String timerName, java.lang.String timerDesc, java.util.Map<java.lang.String,java.lang.String> tags)Create an instance with the provided properties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Remove the timers.voidfailure(java.lang.Object sample, java.lang.String exception)Record failure.java.lang.Objectstart()Start the timer.voidsuccess(java.lang.Object sample)Record success.
 
- 
- 
- 
Constructor Detail- 
MicrometerHolderpublic MicrometerHolder(@Nullable org.springframework.context.ApplicationContext context, java.lang.String name, java.lang.String timerName, java.lang.String timerDesc, java.util.Map<java.lang.String,java.lang.String> tags)Create an instance with the provided properties.- Parameters:
- context- the application context from which to obtain the meter registry.
- name- the value of the 'name' tag.
- timerName- the timer name.
- timerDesc- the timer description.
- tags- additional tags.
 
 
- 
 - 
Method Detail- 
startpublic java.lang.Object start() Start the timer.- Returns:
- the sample.
 
 - 
successpublic void success(java.lang.Object sample) Record success.- Parameters:
- sample- the sample.
- See Also:
- start()
 
 - 
failurepublic void failure(java.lang.Object sample, java.lang.String exception)Record failure.- Parameters:
- sample- the sample.
- exception- the exception name.
- See Also:
- start()
 
 - 
destroypublic void destroy() Remove the timers.
 
- 
 
-