接口的使用
java.util.concurrent.ConcurrentMap
使用 ConcurrentMap 的包
包
描述
HTTP 客户端和 WebSocket API
通常在并发编程中有用的实用程序类。
支持对元素流进行函数式操作的类,例如对集合的 map-reduce 转换。
-
ConcurrentMap 在 java.net.http 中的用法
java.net.http 中的方法,参数类型为 ConcurrentMap修饰符和类型方法描述static <T> HttpResponse.PushPromiseHandler<T>HttpResponse.PushPromiseHandler.of(Function<HttpRequest, HttpResponse.BodyHandler<T>> pushPromiseHandler, ConcurrentMap<HttpRequest, CompletableFuture<HttpResponse<T>>> pushPromisesMap) 返回一个推送承诺处理程序,该处理程序将推送承诺及其响应累积到给定的map中。 -
ConcurrentMap 在 java.util.concurrent 中的用法
修饰符和类型类描述classConcurrentHashMap<K,V> 一个哈希表,支持检索的完全并发和更新的高预期并发。class可扩展的并发ConcurrentNavigableMap实现。 -
ConcurrentMap 在 java.util.stream 中的用法
java.util.stream 中的方法,类型参数为 ConcurrentMap修饰符和类型方法描述static <T,K, A, D, M extends ConcurrentMap<K, D>>
Collector<T,?, M> Collectors.groupingByConcurrent(Function<? super T, ? extends K> classifier, Supplier<M> mapFactory, Collector<? super T, A, D> downstream) 返回并发Collector对类型为T的输入元素实施级联“分组依据”操作,根据分类函数对元素进行分组,然后使用指定的下游Collector对与给定键关联的值执行缩减操作。static <T,K, U, M extends ConcurrentMap<K, U>>
Collector<T,?, M> Collectors.toConcurrentMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends U> valueMapper, BinaryOperator<U> mergeFunction, Supplier<M> mapFactory) 返回并发的Collector将元素累积到ConcurrentMap中,其键和值是将提供的映射函数应用于输入元素的结果。返回类型中包含 ConcurrentMap 类型参数的 java.util.stream 中的方法修饰符和类型方法描述static <T,K> Collector<T, ?, ConcurrentMap<K, List<T>>> Collectors.groupingByConcurrent(Function<? super T, ? extends K> classifier) 返回并发Collector对类型为T的输入元素执行“分组依据”操作,根据分类函数对元素进行分组。static <T,K, A, D>
Collector<T,?, ConcurrentMap<K, D>> Collectors.groupingByConcurrent(Function<? super T, ? extends K> classifier, Collector<? super T, A, D> downstream) 返回并发Collector对类型为T的输入元素实施级联“分组依据”操作,根据分类函数对元素进行分组,然后使用指定的下游Collector对与给定键关联的值执行缩减操作。static <T,K, U> Collector<T, ?, ConcurrentMap<K, U>> Collectors.toConcurrentMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends U> valueMapper) 返回并发的Collector将元素累积到ConcurrentMap中,其键和值是将提供的映射函数应用于输入元素的结果。static <T,K, U> Collector<T, ?, ConcurrentMap<K, U>> Collectors.toConcurrentMap(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends U> valueMapper, BinaryOperator<U> mergeFunction) 返回并发的Collector将元素累积到ConcurrentMap中,其键和值是将提供的映射函数应用于输入元素的结果。