Uses of Class
jdk.incubator.concurrent.ScopedValue
Packages that use ScopedValue
-
Uses of ScopedValue in jdk.incubator.concurrent
Methods in jdk.incubator.concurrent that return ScopedValueModifier and TypeMethodDescriptionstatic <T> ScopedValue<T>
ScopedValue.newInstance()
Creates a scoped value that is initially unbound for all threads.Methods in jdk.incubator.concurrent with parameters of type ScopedValueModifier and TypeMethodDescription<T> T
ScopedValue.Carrier.get
(ScopedValue<T> key) Returns the value of aScopedValue
in this mapping.ScopedValue.Carrier.where
(ScopedValue<T> key, T value) Returns a newCarrier
with the mappings from this carrier plus a new mapping fromkey
tovalue
.static <T> ScopedValue.Carrier
ScopedValue.where
(ScopedValue<T> key, T value) Creates a newCarrier
with a single mapping of aScopedValue
key to a value.static <T> void
ScopedValue.where
(ScopedValue<T> key, T value, Runnable op) Run an operation with aScopedValue
bound to a value in the current thread.static <T,
R> R ScopedValue.where
(ScopedValue<T> key, T value, Callable<? extends R> op) Calls a value-returning operation with aScopedValue
bound to a value in the current thread.