Package io.quarkus.vertx.core.runtime
Enum Class VertxMDC
- All Implemented Interfaces:
Serializable
,Comparable<VertxMDC>
,Constable
,org.jboss.logmanager.MDCProvider
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final InheritableThreadLocal<Map<String,
Object>> -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the current MDC map.void
clear
(io.vertx.core.Context vertxContext) Clear the current MDC map.copy()
Get a copy of the MDC map.copy
(io.vertx.core.Context vertxContext) Get a copy of the MDC map.Get a copy of the MDC map.copyObject
(io.vertx.core.Context vertxContext) Get a copy of the MDC map.Get the value for a key, ornull
if there is no mapping.Get the value for a key the in specified Context, ornull
if there is no mapping.Get the value for a key, ornull
if there is no mapping.Get the value for a key the in specified Context, ornull
if there is no mapping.boolean
isEmpty()
Determine whether the current MDC map is empty.Set the value of a key, returning the old value (if any) ornull
if there was none.Set the value of a key, returning the old value (if any) ornull
if there was none.Set the value of a key, returning the old value (if any) ornull
if there was none.Set the value of a key, returning the old value (if any) ornull
if there was none.Removes a key.Removes a key.removeObject
(String key) Removes a key.removeObject
(String key, io.vertx.core.Context vertxContext) Removes a key.static VertxMDC
Returns the enum constant of this class with the specified name.static VertxMDC[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Field Details
-
inheritableThreadLocalMap
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
get
Get the value for a key, ornull
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 interfaceorg.jboss.logmanager.MDCProvider
- Parameters:
key
- the key- Returns:
- the value
-
getObject
Get the value for a key, ornull
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 interfaceorg.jboss.logmanager.MDCProvider
- Parameters:
key
- the key- Returns:
- the value
-
get
Get the value for a key the in specified Context, ornull
if there is no mapping. If the informed context is null it falls back to the thread local context map.- Parameters:
key
- the keyvertxContext
- the context- Returns:
- the value
-
getObject
Get the value for a key the in specified Context, ornull
if there is no mapping. If the context is null it falls back to the thread local context map.- Parameters:
key
- the keyvertxContext
- the context- Returns:
- the value
-
put
Set the value of a key, returning the old value (if any) ornull
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 interfaceorg.jboss.logmanager.MDCProvider
- Parameters:
key
- the keyvalue
- the new value- Returns:
- the old value or
null
if there was none
-
putObject
Set the value of a key, returning the old value (if any) ornull
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 interfaceorg.jboss.logmanager.MDCProvider
- Parameters:
key
- the keyvalue
- the new value- Returns:
- the old value or
null
if there was none
-
put
Set the value of a key, returning the old value (if any) ornull
if there was none. If the informed context is null it falls back to the thread local context map.- Parameters:
key
- the keyvalue
- the new value- Returns:
- the old value or
null
if there was none
-
putObject
Set the value of a key, returning the old value (if any) ornull
if there was none. If the informed context is null it falls back to the thread local context map.- Parameters:
key
- the keyvalue
- the new value- Returns:
- the old value or
null
if there was none
-
remove
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 interfaceorg.jboss.logmanager.MDCProvider
- Parameters:
key
- the key- Returns:
- the old value or
null
if there was none
-
removeObject
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 interfaceorg.jboss.logmanager.MDCProvider
- Parameters:
key
- the key- Returns:
- the old value or
null
if there was none
-
remove
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
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
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 interfaceorg.jboss.logmanager.MDCProvider
- Returns:
- a copy of the map
-
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 interfaceorg.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 interfaceorg.jboss.logmanager.MDCProvider
- Returns:
true
if there are no bound MDC values, orfalse
otherwise
-
copy
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
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 interfaceorg.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.
-