| Modifier and Type | Field and Description |
|---|---|
| public static final String | INHERITABLE_MAP
Property name ( ) for selecting |
| private static boolean | |
| private final ThreadLocal | |
| private static final long | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | containsKey(final String
The key to locate. key)Implements org. Determines if the key is in the context. |
| pack-priv static ThreadLocal | |
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public <V> void | forEach(final BiConsumer<String, ? super V>
The action to be performed for each key-value pair in this collection. action)Implements org. Performs the given action for each key-value pair in this data structure until all entries have been processed or the action throws an exception. |
| public <V, S> void | forEach(final TriConsumer<String, ? super V, S>
The action to be performed for each key-value pair in this collection. action, final S the object to be passed as the third parameter to each invocation on the specified
triconsumer. state)Implements org. Performs the given action for each key-value pair in this data structure until all entries have been processed or the action throws an exception. |
| public String | get(final String
The key to locate. key)Implements org. Gets the context identified by the |
| public Map | getCopy()
Implements org. Gets a non- |
| public Map | getImmutableMapOrNull()
Implements org. Returns an immutable view on the context Map or |
| public <V> V | getValue(final String
the key whose value to return. key)Implements org. Returns the value for the specified key, or |
| public int | |
| pack-priv static void | |
| public boolean | isEmpty()
Implements org. Returns true if the Map is empty. |
| public void | put(final String
The key name. key, final String The key value. value)Implements org. Puts a context value (the |
| public void | |
| public void | remove(final String
The key to remove. key)Implements org. Removes the context identified by the |
| public void | |
| public int | size()
Implements org. Returns the number of key-value pairs in this collection. |
| public Map | toMap()
Implements org. Returns a non- |
| public String |
| INHERITABLE_MAP | back to summary |
|---|---|
| public static final String INHERITABLE_MAP Property name ( ) for selecting | |
| inheritableMap | back to summary |
|---|---|
| private static boolean inheritableMap | |
| localMap | back to summary |
|---|---|
| private final ThreadLocal<Map<String, String>> localMap | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| useMap | back to summary |
|---|---|
| private final boolean useMap | |
| DefaultThreadContextMap | back to summary |
|---|---|
| public DefaultThreadContextMap() | |
| DefaultThreadContextMap | back to summary |
|---|---|
| public DefaultThreadContextMap(final boolean useMap) | |
| clear | back to summary |
|---|---|
| public void clear() Implements org. Doc from org. Clears the context.
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(final String key) Implements org. Doc from org. Determines if the key is in the context. | |
| createThreadLocalMap | back to summary |
|---|---|
| pack-priv static ThreadLocal | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| forEach | back to summary |
|---|---|
| public <V> void forEach(final BiConsumer<String, ? super V> action) Implements org. Doc from org. Performs the given action for each key-value pair in this data structure until all entries have been processed or the action throws an exception.
Some implementations may not support structural modifications (adding new elements or removing elements) while
iterating over the contents. In such implementations, attempts to add or remove elements from the
| |
| forEach | back to summary |
|---|---|
| public <V, S> void forEach(final TriConsumer<String, ? super V, S> action, final S state) Implements org. Doc from org. Performs the given action for each key-value pair in this data structure until all entries have been processed or the action throws an exception. The third parameter lets callers pass in a stateful object to be modified with the key-value pairs, so the TriConsumer implementation itself can be stateless and potentially reusable.
Some implementations may not support structural modifications (adding new elements or removing elements) while
iterating over the contents. In such implementations, attempts to add or remove elements from the
| |
| get | back to summary |
|---|---|
| public String get(final String key) Implements org. Doc from org. Gets the context identified by the This method has no side effects. | |
| getCopy | back to summary |
|---|---|
| public Map Implements org. Doc from org. Gets a non- | |
| getImmutableMapOrNull | back to summary |
|---|---|
| public Map Implements org. Doc from org. Returns an immutable view on the context Map or | |
| getValue | back to summary |
|---|---|
| public <V> V getValue(final String key) Implements org. Doc from org. Returns the value for the specified key, or
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| init | back to summary |
|---|---|
| pack-priv static void init() | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements org. Doc from org. Returns true if the Map is empty.
| |
| put | back to summary |
|---|---|
| public void put(final String key, final String value) Implements org. Doc from org. Puts a context value (the If the current thread does not have a context map it is created as a side effect. | |
| putAll | back to summary |
|---|---|
| public void putAll(final Map<String, String> m) | |
| remove | back to summary |
|---|---|
| public void remove(final String key) Implements org. Doc from org. Removes the context identified by the | |
| removeAll | back to summary |
|---|---|
| public void removeAll(final Iterable<String> keys) | |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from org. Returns the number of key-value pairs in this collection.
| |
| toMap | back to summary |
|---|---|
| public Map Implements org. Doc from org. Returns a non- | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |