インタフェースjava.util.concurrent.ConcurrentMap
の使用
| パッケージ | 説明 |
|---|---|
| java.net.http |
HTTPクライアントおよびWebSocket API
|
| java.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のサブインタフェース 修飾子と型 インタフェース 説明 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を返します(指定されたマッピング関数を入力要素に適用した結果が、マップのキーと値になる)。