Class QuotaEvent


  • public class QuotaEvent
    extends java.lang.Object
    Adds MDC key:value pairs for a quota event. The contents of the MDC are added to each log entry.

    Suggested usage: try (QuotaEventCloseable qec = new QuotaEvent.Builder().withOperation(op).withFullResourceName(name).create()) { LOG.info(...); }

    MDC data is thread-local. After calling QuotaEventClosable.close, any overwritten quota_event.* keys will not be restored.

    • Constructor Summary

      Constructors 
      Constructor Description
      QuotaEvent()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void setEnabled​(boolean enabled)
      Set whether this feature is enabled.
      • Methods inherited from class java.lang.Object

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

      • QuotaEvent

        public QuotaEvent()
    • Method Detail

      • setEnabled

        public static void setEnabled​(boolean enabled)
        Set whether this feature is enabled. Affects Builder.create().