类的用途
jdk.incubator.concurrent.ScopedValue
使用 ScopedValue 的包
-
ScopedValue 在 jdk.incubator.concurrent 中的用法
jdk.incubator.concurrent 中返回 ScopedValue 的方法jdk.incubator.concurrent 中的方法,参数类型为 ScopedValue修饰符和类型方法描述<T> TScopedValue.Carrier.get(ScopedValue<T> key) 返回此map中ScopedValue的值。ScopedValue.Carrier.where(ScopedValue<T> key, T value) 返回一个新的Carrier,其中包含来自该运营商的映射以及从key到value的新映射。static <T> ScopedValue.CarrierScopedValue.where(ScopedValue<T> key, T value) 使用ScopedValuekey 到值的单个映射创建一个新的Carrier。static <T> voidScopedValue.where(ScopedValue<T> key, T value, Runnable op) 使用绑定到当前线程中的值的ScopedValue运行操作。static <T,R> R ScopedValue.where(ScopedValue<T> key, T value, Callable<? extends R> op) 使用绑定到当前线程中的值的ScopedValue调用值返回操作。