Context.
Local storage should be registered before creating a io. instance, once registered a
local storage cannot be unregistered.
It is recommended to initialize local storage as static fields of a io.,
since providers are discovered before the capture of known local storages.
| Modifier and Type | Method and Description |
|---|---|
| public default T | |
| public default T | |
| public default T | |
| public default T | get(Context context, AccessMode accessMode, Supplier<? extends T> initialValueSupplier)
Like |
| public default void | |
| public default void | |
| public static <T> ContextLocal | |
| public static <T> ContextLocal | Returns: the context local storageRegisters a context local storage. |
| public default void | |
| public default void |
| get | back to summary |
|---|---|
| public default T get(Context context) Get the local data from the
| |
| get | back to summary |
|---|---|
| public default T get(Context context, Supplier<? extends T> initialValueSupplier) Get the local data from the
| |
| get | back to summary |
|---|---|
| public default T get(Context context, AccessMode accessMode) Like | |
| get | back to summary |
|---|---|
| public default T get(Context context, AccessMode accessMode, Supplier<? extends T> initialValueSupplier) Like | |
| put | back to summary |
|---|---|
| public default void put(Context context, T data) Put local data in the
| |
| put | back to summary |
|---|---|
| public default void put(Context context, AccessMode accessMode, T value) Like | |
| registerLocal | back to summary |
|---|---|
| public static <T> ContextLocal Registers a context local storage.
| |
| registerLocal | back to summary |
|---|---|
| public static <T> ContextLocal Registers a context local storage.
| |
| remove | back to summary |
|---|---|
| public default void remove(Context context) Remove the local data from the context. | |
| remove | back to summary |
|---|---|
| public default void remove(Context context, AccessMode accessMode) Like | |