Class MetricsEnabled

  • All Implemented Interfaces:
    org.springframework.context.annotation.Condition

    public class MetricsEnabled
    extends java.lang.Object
    implements org.springframework.context.annotation.Condition
    Checks whether MeterRegistry bean is present it or not. if MeterRegistry bean is founds then it's assumed that Metric feature is enables. It's essential to restrict the bean creation otherwise can lead to error in bootstrap process.
    • Constructor Summary

      Constructors 
      Constructor Description
      MetricsEnabled()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean matches​(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MetricsEnabled

        public MetricsEnabled()
    • Method Detail

      • matches

        public boolean matches​(org.springframework.context.annotation.ConditionContext context,
                               org.springframework.core.type.AnnotatedTypeMetadata metadata)
        Specified by:
        matches in interface org.springframework.context.annotation.Condition