ThreadLocal.
ContextRegistry#registerThreadLocalAccessor(ThreadLocalAccessor), ContextRegistry#registerThreadLocalAccessor(String, Supplier, Consumer, Runnable)
| Modifier and Type | Method and Description |
|---|---|
| public V | |
| public Object | |
| public default void | reset()
Deprecated
To be replaced by calls to
Remove the setValue() (and/or
restore()), which needs to be implemented when this implementation is
removed.
ThreadLocal value when setting ThreadLocal values in
case of missing mapping for a key() from a ContextSnapshot, or a
Context object (operated upon by ContextAccessor).
|
| public default void | restore(V
previous value to set, never previousValue)null when called from a
ContextSnapshot * implementation, which is not allowed to store mappings to
null.Restore the |
| public default void | restore()
Called instead of |
| public void | setValue(V
the value to set, never value)null when called from a
ContextSnapshot implementation, which is not allowed to store mappings to
null.Set the |
| public default void | setValue()
Called instead of |
| getValue | back to summary |
|---|---|
| public V getValue() Return the current This method is called in two scenarios:
| |
| key | back to summary |
|---|---|
| public Object key() The key to associate with the ThreadLocal value when saved within a
| |
| reset | back to summary |
|---|---|
| public default void reset()
Deprecated To be replaced by calls to Remove the
| |
| restore | back to summary |
|---|---|
| public default void restore(V previousValue) Restore the
| |
| restore | back to summary |
|---|---|
| public default void restore() Called instead of
| |
| setValue | back to summary |
|---|---|
| public void setValue(V value) Set the
| |
| setValue | back to summary |
|---|---|
| public default void setValue() Called instead of
| |