Uses of Class
java.lang.ScopedValue
Package
Description
Provides classes that are fundamental to the design of the Java
programming language.
-
Uses of ScopedValuePREVIEW in java.lang
Modifier and TypeMethodDescriptionstatic <T> ScopedValuePREVIEW
<T> ScopedValue.newInstance()
Creates a scoped value that is initially unbound for all threads.Modifier and TypeMethodDescriptionstatic <T,
R> R ScopedValue.callWhere
(ScopedValuePREVIEW<T> key, T value, Callable<? extends R> op) Calls a value-returning operation with aScopedValue
bound to a value in the current thread.<T> T
ScopedValue.Carrier.get
(ScopedValuePREVIEW<T> key) Returns the value of aScopedValue
PREVIEW in this mapping.static <T,
R> R ScopedValue.getWhere
(ScopedValuePREVIEW<T> key, T value, Supplier<? extends R> op) Invokes a supplier of results with aScopedValue
bound to a value in the current thread.static <T> void
ScopedValue.runWhere
(ScopedValuePREVIEW<T> key, T value, Runnable op) Run an operation with aScopedValue
bound to a value in the current thread.ScopedValue.Carrier.where
(ScopedValuePREVIEW<T> key, T value) Returns a newCarrier
with the mappings from this carrier plus a new mapping fromkey
tovalue
.static <T> ScopedValue.CarrierPREVIEW
ScopedValue.where
(ScopedValuePREVIEW<T> key, T value) Creates a newCarrier
with a single mapping of aScopedValue
key to a value.