インタフェースjava.util.concurrent.ConcurrentMap
の使用
ConcurrentMapを使用するパッケージ
パッケージ
説明
HTTPクライアントおよびWebSocket API
並行プログラミングでよく使用されるユーティリティ・クラスです。
コレクションに対するマップ-リデュース変換など、要素のストリームに対する関数型の操作をサポートするクラスです。
-
java.net.httpでのConcurrentMapの使用
型ConcurrentMapのパラメータを持つjava.net.httpのメソッド修飾子と型メソッド説明static <T> HttpResponse.PushPromiseHandler<T>HttpResponse.PushPromiseHandler.of(Function<HttpRequest,HttpResponse.BodyHandler<T>> pushPromiseHandler, ConcurrentMap<HttpRequest,CompletableFuture<HttpResponse<T>>> pushPromisesMap)指定されたマップに、プッシュ・プロミスおよびそのレスポンスを累積する、プッシュ・プロミス・ハンドラを返します。 -
java.util.concurrentでのConcurrentMapの使用
java.util.concurrentのConcurrentMapのサブインタフェース修飾子と型インタフェース説明interfaceConcurrentNavigableMap<K,V>NavigableMapオペレーションをサポートするConcurrentMapです。そのナビゲート可能なサブマップに対しては再帰的です。ConcurrentMapを実装しているjava.util.concurrentのクラス修飾子と型クラス説明classConcurrentHashMap<K,V>取得の完全な同時性および予想される高い更新平行性をサポートするハッシュ表です。classConcurrentSkipListMap<K,V>スケーラブルな並行ConcurrentNavigableMap実装です。 -
java.util.streamでのConcurrentMapの使用
型ConcurrentMapの型パラメータを持つjava.util.streamのメソッド修飾子と型メソッド説明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)ConcurrentMap内に要素を累積する並行Collectorを返します(指定されたマッピング関数を入力要素に適用した結果が、マップのキーと値になる)。型ConcurrentMapの引数を持つ型を返すjava.util.streamのメソッド修飾子と型メソッド説明static <T, K> Collector<T,?,ConcurrentMap<K,List<T>>>Collectors.groupingByConcurrent(Function<? super T,? extends K> classifier)分類関数に従って要素をグループ化する、T型の入力要素に対する「グループ化」操作を実装した並行Collectorを返します。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)ConcurrentMap内に要素を累積する並行Collectorを返します(指定されたマッピング関数を入力要素に適用した結果が、マップのキーと値になる)。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)ConcurrentMap内に要素を累積する並行Collectorを返します(指定されたマッピング関数を入力要素に適用した結果が、マップのキーと値になる)。