Enum Class VertxMDC

java.lang.Object
java.lang.Enum<VertxMDC>
io.quarkus.vertx.core.runtime.VertxMDC
All Implemented Interfaces:
Serializable, Comparable<VertxMDC>, Constable, org.jboss.logmanager.MDCProvider

public enum VertxMDC extends Enum<VertxMDC> implements org.jboss.logmanager.MDCProvider
  • Enum Constant Details

    • INSTANCE

      public static final VertxMDC INSTANCE
  • Field Details

  • Method Details

    • values

      public static VertxMDC[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static VertxMDC valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public String get(String key)
      Get the value for a key, or null if there is no mapping. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      get in interface org.jboss.logmanager.MDCProvider
      Parameters:
      key - the key
      Returns:
      the value
    • getObject

      public Object getObject(String key)
      Get the value for a key, or null if there is no mapping. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      getObject in interface org.jboss.logmanager.MDCProvider
      Parameters:
      key - the key
      Returns:
      the value
    • get

      public String get(String key, io.vertx.core.Context vertxContext)
      Get the value for a key the in specified Context, or null if there is no mapping. If the informed context is null it falls back to the thread local context map.
      Parameters:
      key - the key
      vertxContext - the context
      Returns:
      the value
    • getObject

      public Object getObject(String key, io.vertx.core.Context vertxContext)
      Get the value for a key the in specified Context, or null if there is no mapping. If the context is null it falls back to the thread local context map.
      Parameters:
      key - the key
      vertxContext - the context
      Returns:
      the value
    • put

      public String put(String key, String value)
      Set the value of a key, returning the old value (if any) or null if there was none. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      put in interface org.jboss.logmanager.MDCProvider
      Parameters:
      key - the key
      value - the new value
      Returns:
      the old value or null if there was none
    • putObject

      public Object putObject(String key, Object value)
      Set the value of a key, returning the old value (if any) or null if there was none. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      putObject in interface org.jboss.logmanager.MDCProvider
      Parameters:
      key - the key
      value - the new value
      Returns:
      the old value or null if there was none
    • put

      public String put(String key, String value, io.vertx.core.Context vertxContext)
      Set the value of a key, returning the old value (if any) or null if there was none. If the informed context is null it falls back to the thread local context map.
      Parameters:
      key - the key
      value - the new value
      Returns:
      the old value or null if there was none
    • putObject

      public Object putObject(String key, Object value, io.vertx.core.Context vertxContext)
      Set the value of a key, returning the old value (if any) or null if there was none. If the informed context is null it falls back to the thread local context map.
      Parameters:
      key - the key
      value - the new value
      Returns:
      the old value or null if there was none
    • remove

      public String remove(String key)
      Removes a key. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      remove in interface org.jboss.logmanager.MDCProvider
      Parameters:
      key - the key
      Returns:
      the old value or null if there was none
    • removeObject

      public Object removeObject(String key)
      Removes a key. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      removeObject in interface org.jboss.logmanager.MDCProvider
      Parameters:
      key - the key
      Returns:
      the old value or null if there was none
    • remove

      public String remove(String key, io.vertx.core.Context vertxContext)
      Removes a key. If the informed context is null it falls back to the thread local context map.
      Parameters:
      key - the key
      Returns:
      the old value or null if there was none
    • removeObject

      public Object removeObject(String key, io.vertx.core.Context vertxContext)
      Removes a key. If the informed context is null it falls back to the thread local context map.
      Parameters:
      key - the key
      Returns:
      the old value or null if there was none
    • copy

      public Map<String,String> copy()
      Get a copy of the MDC map. This is a relatively expensive operation. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      copy in interface org.jboss.logmanager.MDCProvider
      Returns:
      a copy of the map
    • copyObject

      public Map<String,Object> copyObject()
      Get a copy of the MDC map. This is a relatively expensive operation. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      copyObject in interface org.jboss.logmanager.MDCProvider
      Returns:
      a copy of the map
    • isEmpty

      public boolean isEmpty()
      Determine whether the current MDC map is empty.
      Specified by:
      isEmpty in interface org.jboss.logmanager.MDCProvider
      Returns:
      true if there are no bound MDC values, or false otherwise
    • copy

      public Map<String,String> copy(io.vertx.core.Context vertxContext)
      Get a copy of the MDC map. This is a relatively expensive operation. If the informed context is null it falls back to the thread local context map.
      Returns:
      a copy of the map
    • copyObject

      public Map<String,Object> copyObject(io.vertx.core.Context vertxContext)
      Get a copy of the MDC map. This is a relatively expensive operation. If the informed context is null it falls back to the thread local context map.
      Returns:
      a copy of the map
    • clear

      public void clear()
      Clear the current MDC map. Tries to use the current Vert.x Context, if the context is non-existent meaning that it was called out of a Vert.x thread it will fall back to the thread local context map.
      Specified by:
      clear in interface org.jboss.logmanager.MDCProvider
    • clear

      public void clear(io.vertx.core.Context vertxContext)
      Clear the current MDC map. If the informed context is null it falls back to the thread local context map.