public class Log4jv2ThreadContextMap extends Object implements ThreadContextMap
| Constructor and Description |
|---|
Log4jv2ThreadContextMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the context.
|
boolean |
containsKey(String key)
Determine if the key is in the context.
|
static void |
dispose() |
String |
get(String key)
Get the context identified by the
key parameter. |
Map<String,String> |
getCopy()
Get a non-
null mutable copy of current thread's context Map. |
Map<String,String> |
getImmutableMapOrNull()
Return an immutable view on the context Map or
null if the context map is empty. |
boolean |
isEmpty()
Returns true if the Map is empty.
|
void |
put(String key,
String value)
Put a context value (the
o parameter) as identified
with the key parameter into the current thread's
context map. |
void |
remove(String key)
Remove the the context identified by the
key
parameter. |
static void |
setBundleContext(org.osgi.framework.BundleContext ctx) |
public static void setBundleContext(org.osgi.framework.BundleContext ctx)
public static void dispose()
public void put(String key, String value)
ThreadContextMapo parameter) as identified
with the key parameter into the current thread's
context map.
If the current thread does not have a context map it is created as a side effect.
put in interface ThreadContextMapkey - The key name.value - The key value.public String get(String key)
ThreadContextMapkey parameter.
This method has no side effects.
get in interface ThreadContextMapkey - The key to locate.public void remove(String key)
ThreadContextMapkey
parameter.remove in interface ThreadContextMapkey - The key to remove.public void clear()
ThreadContextMapclear in interface ThreadContextMappublic boolean containsKey(String key)
ThreadContextMapcontainsKey in interface ThreadContextMapkey - The key to locate.public Map<String,String> getCopy()
ThreadContextMapnull mutable copy of current thread's context Map.getCopy in interface ThreadContextMappublic Map<String,String> getImmutableMapOrNull()
ThreadContextMapnull if the context map is empty.getImmutableMapOrNull in interface ThreadContextMapnull.public boolean isEmpty()
ThreadContextMapisEmpty in interface ThreadContextMapCopyright © 2006-2016 OPS4J - Open Participation Software for Java. All Rights Reserved.