public static class ContextAttributes.Impl extends ContextAttributes implements Serializable
ContextAttributes.Impl| Modifier and Type | Field and Description |
|---|---|
protected Map<Object,Object> |
_nonShared
Per-call attributes that we can directly modify, since they are not
shared between threads.
|
protected Map<?,?> |
_shared
Shared attributes that we cannot modify in-place.
|
protected static ContextAttributes.Impl |
EMPTY |
protected static Object |
NULL_SURROGATE |
| Modifier | Constructor and Description |
|---|---|
protected |
Impl(Map<?,?> shared) |
protected |
Impl(Map<?,?> shared,
Map<Object,Object> nonShared) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAttribute(Object key)
Accessor for value of specified attribute
|
static ContextAttributes |
getEmpty() |
protected ContextAttributes |
nonSharedInstance(Object key,
Object value)
Overridable method that creates initial non-shared instance,
with the first explicit set value.
|
ContextAttributes |
withoutSharedAttribute(Object key) |
ContextAttributes |
withPerCallAttribute(Object key,
Object value)
Mutator used during call (via context) to set value of "non-shared"
part of attribute set.
|
ContextAttributes |
withSharedAttribute(Object key,
Object value)
Fluent factory method for creating a new instance with an additional
shared attribute.
|
ContextAttributes |
withSharedAttributes(Map<?,?> shared)
Fluent factory method for creating a new instance with specified set of
shared attributes.
|
protected static final ContextAttributes.Impl EMPTY
protected static final Object NULL_SURROGATE
protected final Map<?,?> _shared
protected Impl(Map<?,?> shared)
public static ContextAttributes getEmpty()
public ContextAttributes withSharedAttribute(Object key, Object value)
ContextAttributeswithSharedAttribute in class ContextAttributeskey - Name of the attribute to addvalue - Value of the attribute to add; may be null, in which case
attribute will be removed if it already exists.ContextAttributes that has specified change.public ContextAttributes withSharedAttributes(Map<?,?> shared)
ContextAttributeswithSharedAttributes in class ContextAttributesshared - Map of shared attributes to add, replacing any existing ones.ContextAttributes that has specified shared attributes.public ContextAttributes withoutSharedAttribute(Object key)
withoutSharedAttribute in class ContextAttributespublic Object getAttribute(Object key)
ContextAttributesgetAttribute in class ContextAttributespublic ContextAttributes withPerCallAttribute(Object key, Object value)
ContextAttributeswithPerCallAttribute in class ContextAttributesprotected ContextAttributes nonSharedInstance(Object key, Object value)
Copyright © 2008–2025 FasterXML. All rights reserved.