インタフェースjava.util.concurrent.ConcurrentMap
の使用
-
ConcurrentMapを使用するパッケージ パッケージ 説明 java.net.http HTTPクライアントおよびWebSocket APIjava.util.concurrent 並行プログラミングでよく使用されるユーティリティ・クラスです。java.util.stream コレクションに対するマップ-リデュース変換など、要素のストリームに対する関数型の操作をサポートするクラスです。 -
-
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のサブインタフェース 修飾子と型 インタフェース 説明 interface
ConcurrentNavigableMap<K,V>
NavigableMap
オペレーションをサポートするConcurrentMap
です。そのナビゲート可能なサブマップに対しては再帰的です。ConcurrentMapを実装しているjava.util.concurrentのクラス 修飾子と型 クラス 説明 class
ConcurrentHashMap<K,V>
取得の完全な同時性および予想される高い更新平行性をサポートするハッシュ表です。class
ConcurrentSkipListMap<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
を返します(指定されたマッピング関数を入力要素に適用した結果が、マップのキーと値になる)。
-