ContextSnapshot.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | DefaultContextSnapshot.DefaultScope
Default implementation of |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final ContextRegistry |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static Map | |
| pack-priv static <V> Map | setThreadLocal(Object key, V value, ThreadLocalAccessor<?> accessor, Map<Object, Object> previousValues)
|
| public ContextSnapshot. | setThreadLocals()
Implements io. ThreadLocal values from the snapshot.
|
| public ContextSnapshot. | setThreadLocals(Predicate<Object>
selects keys for use when setting keyPredicate)ThreadLocal valuesImplements io. setThreadLocals() with a predicate to select context values by
key.
|
| public String | |
| public <C> C | updateContext(C
the context to write to context)Implements io. |
| public <C> C | updateContext(C
the context to write to context, Predicate<Object> predicate for context value keys keyPredicate)Implements io. updateContext(Object) to update the given context with a subset
of snapshot values.
|
| private <C> C |
| clearMissing | back to summary |
|---|---|
| private final boolean clearMissing | |
| contextRegistry | back to summary |
|---|---|
| private final ContextRegistry contextRegistry | |
| DefaultContextSnapshot | back to summary |
|---|---|
| pack-priv DefaultContextSnapshot(ContextRegistry contextRegistry, boolean clearMissing) | |
| clearThreadLocal | back to summary |
|---|---|
pack-priv static Map
| |
| setThreadLocal | back to summary |
|---|---|
pack-priv static <V> Map
| |
| setThreadLocals | back to summary |
|---|---|
| public ContextSnapshot. Implements io. Doc from io. Set
| |
| setThreadLocals | back to summary |
|---|---|
| public ContextSnapshot. Implements io. Doc from io. Variant of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of this map. The string representation
consists of a list of key-value mappings in the order returned by the
map's | |
| updateContext | back to summary |
|---|---|
| public <C> C updateContext(C context) Implements io. Doc from io. Update the given context with all snapshot values.
| |
| updateContext | back to summary |
|---|---|
| public <C> C updateContext(C context, Predicate<Object> keyPredicate) Implements io. Doc from io. Variant of | |
| updateContextInternal | back to summary |
|---|---|
private <C> C updateContextInternal(C context, Map<Object, Object> valueContainer)
| |
Scope.
| Modifier and Type | Field and Description |
|---|---|
| private final ContextRegistry | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements io. ThreadLocal values, either removing them or restoring their
previous values, if any.
|
| public static ContextSnapshot. | |
| private <V> void |
| contextRegistry | back to summary |
|---|---|
| private final ContextRegistry contextRegistry | |
| previousValues | back to summary |
|---|---|
| private final Map<Object, Object> previousValues | |
| DefaultScope | back to summary |
|---|---|
| private DefaultScope(Map<Object, Object> previousValues, ContextRegistry contextRegistry) | |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from io. Reset
| |
| from | back to summary |
|---|---|
| public static ContextSnapshot. | |
| resetThreadLocalValue | back to summary |
|---|---|
private <V> void resetThreadLocalValue(ThreadLocalAccessor<?> accessor, V previousValue)
| |