インタフェースjava.util.concurrent.Executor
の使用
-
Executorを使用するパッケージ パッケージ 説明 com.sun.net.httpserver 組込みのHTTPサーバーの構築に使用できる、単純で高度なHTTPサーバーAPIを提供します。java.sql Java™プログラミング言語を使用してデータソース(通常はリレーショナル・データベース)に格納されたデータにアクセスして処理するためのAPIを提供します。java.util.concurrent 並行プログラミングでよく使用されるユーティリティ・クラスです。javafx.concurrent javafx.taskのクラスのセットを提供します。javax.management Java Management Extensionsのコア・クラスを提供します。javax.xml.ws このパッケージは、コアJAX-WS APIを含みます。javax.xml.ws.spi このパッケージは、JAX-WSのSPIを定義します。jdk.incubator.http 高レベルのHTTPとWebSocket API -
-
com.sun.net.httpserverでのExecutorの使用
Executorを戻すcom.sun.net.httpserverのメソッド 修飾子と型 メソッド 説明 abstract Executor
HttpServer. getExecutor()
このサーバーのexecutorオブジェクトがHttpServer.setExecutor(Executor)
で指定された場合は、それを返します。何も指定されていない場合は、null
を返します。型Executorのパラメータを持つcom.sun.net.httpserverのメソッド 修飾子と型 メソッド 説明 abstract void
HttpServer. setExecutor(Executor executor)
このサーバーのExecutor
オブジェクトを設定します。 -
java.sqlでのExecutorの使用
Executor型のパラメータを持つjava.sqlのメソッド 修飾子と型 メソッド 説明 void
Connection. abort(Executor executor)
オープン接続を終了します。void
Connection. setNetworkTimeout(Executor executor, int milliseconds)
Connection
またはConnection
から作成されたオブジェクトが、データベースが任意の1つの要求に応答するのを待つ最大期間を設定します。 -
java.util.concurrentでのExecutorの使用
java.util.concurrentでのExecutorのサブインタフェース 修飾子と型 インタフェース 説明 interface
ExecutorService
interface
ScheduledExecutorService
指定された遅延時間後または定期的にコマンドを実行するようにスケジュールできるExecutorService
です。Executorを実装しているjava.util.concurrentのクラス 修飾子と型 クラス 説明 class
AbstractExecutorService
ExecutorService
実行メソッドのデフォルト実装を提供します。class
ForkJoinPool
ForkJoinTask
を実行するためのExecutorService
。class
ScheduledThreadPoolExecutor
指定された遅延時間後または定期的にコマンドを実行するようにスケジュールできるThreadPoolExecutor
です。class
ThreadPoolExecutor
プールされた複数のスレッドの1つを使用して送信された各タスクを実行するExecutorService
です。通常はExecutors
ファクトリ・メソッドを使用して構成されます。Executorを戻すjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 Executor
CompletableFuture. defaultExecutor()
Executorを指定しない非同期メソッドに使用されるデフォルトのExecutorを返します。static Executor
CompletableFuture. delayedExecutor(long delay, TimeUnit unit)
指定された遅延(非正の場合は遅延なし)の後にデフォルトのexecutorにタスクをサブ・ミットする新しいExecutorを返します。static Executor
CompletableFuture. delayedExecutor(long delay, TimeUnit unit, Executor executor)
指定された遅延(非正の場合は遅延なし)の後に、指定されたベースexecutorにタスクをサブ・ミットする新しいExecutorを返します。Executor
SubmissionPublisher. getExecutor()
非同期配信に使用されるExecutorを返します。Executor型のパラメータを持つjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 CompletableFuture<Void>
CompletableFuture. acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)
CompletionStage<Void>
CompletionStage. acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)
指定されたステージが正常に完了したときに、指定されたステージのいずれかが正常に完了したときに、指定されたエグゼキュータを使用して実行され、対応する結果が指定されたアクションの引数として返される新しいCompletionStageを返します。<U> CompletableFuture<U>
CompletableFuture. applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)
<U> CompletionStage<U>
CompletionStage. applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)
このステージまたは指定された他のステージが正常に完了したときに、対応する結果を指定されたアクションへの引数に設定し、指定されたエグゼキュータを使用して実行される新しいCompletionStageを返します。CompletableFuture<T>
CompletableFuture. completeAsync(Supplier<? extends T> supplier, Executor executor)
指定されたExecutorを使用して非同期タスクから呼び出された、指定されたSupplier関数の結果でこのCompletableFutureを完了します。static Executor
CompletableFuture. delayedExecutor(long delay, TimeUnit unit, Executor executor)
指定された遅延(非正の場合は遅延なし)の後に、指定されたベースexecutorにタスクをサブ・ミットする新しいExecutorを返します。<U> CompletableFuture<U>
CompletableFuture. handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)
<U> CompletionStage<U>
CompletionStage. handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)
このステージが正常終了または異常終了した際に指定されたエグゼキュータを使って実行される新しいCompletionStageを返します(実行時には、指定された関数の引数としてこのステージの結果と例外が使用される)。CompletableFuture<Void>
CompletableFuture. runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
CompletionStage<Void>
CompletionStage. runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
これと他のステージが両方とも正常に完了した場合に、指定されたアクションを指定されたエグゼキュータを使用して実行する新しいCompletionStageを返します。CompletableFuture<Void>
CompletableFuture. runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
CompletionStage<Void>
CompletionStage. runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
このステージと指定された他のステージのどちらかが正常に完了したときに、指定されたエグゼキュータを使用して指定されたアクションを実行する新しいCompletionStageを返します。static CompletableFuture<Void>
CompletableFuture. runAsync(Runnable runnable, Executor executor)
指定されたエグゼキュータで実行されているタスクが指定されたアクションの実行後に非同期に完了する新しいCompletableFutureを返します。static <U> CompletableFuture<U>
CompletableFuture. supplyAsync(Supplier<U> supplier, Executor executor)
指定されたエグゼキュータで実行されているタスクが指定されたサプライヤを呼び出して取得した値を使用して非同期的に完了する新しいCompletableFutureを返します。CompletableFuture<Void>
CompletableFuture. thenAcceptAsync(Consumer<? super T> action, Executor executor)
CompletionStage<Void>
CompletionStage. thenAcceptAsync(Consumer<? super T> action, Executor executor)
このステージが正常に完了したときに、このステージの結果を指定されたアクションへの引数に設定し、指定されたエグゼキュータを使用して実行される新しいCompletionStageを返します。<U> CompletableFuture<Void>
CompletableFuture. thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)
<U> CompletionStage<Void>
CompletionStage. thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)
これと他のステージが両方とも正常に完了したときに、指定されたエグゼキュータを使用して実行され、2つの結果が指定されたアクションの引数として実行される新しいCompletionStageを返します。<U> CompletableFuture<U>
CompletableFuture. thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)
<U> CompletionStage<U>
CompletionStage. thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)
このステージが正常に完了したときに、このステージの結果を指定された関数への引数に設定し、指定されたエグゼキュータを使用して実行される新しいCompletionStageを返します。<U,V> CompletableFuture<V>
CompletableFuture. thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)
<U,V> CompletionStage<V>
CompletionStage. thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)
これと他のステージが両方とも正常に完了したときに、指定された関数の引数として2つの結果を指定して、指定されたexecutorを使用して実行される新しいCompletionStageを返します。<U> CompletableFuture<U>
CompletableFuture. thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)
<U> CompletionStage<U>
CompletionStage. thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)
指定されたExecutorによって返されたCompletionStageと同じ値で完了し、指定されたExecutorを使用して実行される新しいCompletionStageを返します。CompletableFuture<Void>
CompletableFuture. thenRunAsync(Runnable action, Executor executor)
CompletionStage<Void>
CompletionStage. thenRunAsync(Runnable action, Executor executor)
このステージが正常に完了したときに指定されたエグゼキュータを使用して指定されたアクションを実行する新しいCompletionStageを返します。CompletableFuture<T>
CompletableFuture. whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)
CompletionStage<T>
CompletionStage. whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)
このステージの終了時に、指定されたエグゼキュータを使用して指定されたアクションを実行する、このステージの同じ結果または例外を使用して新しいCompletionStageを返します。Executor型のパラメータを持つjava.util.concurrentのコンストラクタ コンストラクタ 説明 ExecutorCompletionService(Executor executor)
基本タスクの実行用に指定されたexecutorを使用し、完了キューとしてLinkedBlockingQueue
を使用して、ExecutorCompletionServiceを作成します。ExecutorCompletionService(Executor executor, BlockingQueue<Future<V>> completionQueue)
基本タスクの実行用に指定されたexecutorを使用し、完了キューとして指定されたキューを使用して、ExecutorCompletionServiceを作成します。SubmissionPublisher(Executor executor, int maxBufferCapacity)
指定されたExecutorを使用してサブスクライバに非同期に配信するための新しいSubmissionPublisherを作成します。各サブスクライバの最大バッファ・サイズは指定されており、メソッドonNext
のサブスクライバ例外ハンドラはありません。SubmissionPublisher(Executor executor, int maxBufferCapacity, BiConsumer<? super Flow.Subscriber<? super T>,? super Throwable> handler)
各サブスクライバに対して指定された最大バッファ・サイズでサブスクライバへの非同期配信用に、指定されたExecutorを使用して新しいSubmissionPublisherを作成し、ヌル以外の場合、サブスクライバがonNext
メソッドで例外をスローしたときに呼び出されます。 -
javafx.concurrentでのExecutorの使用
Executorを戻すjavafx.concurrentのメソッド 修飾子と型 メソッド 説明 Executor
Service. getExecutor()
プロパティexecutorの値を取得します。型Executorの引数を持つ型を返すjavafx.concurrentのメソッド 修飾子と型 メソッド 説明 ObjectProperty<Executor>
Service. executorProperty()
このServiceを実行するために使用する実行者。型Executorのパラメータを持つjavafx.concurrentのメソッド 修飾子と型 メソッド 説明 void
Service. setExecutor(Executor value)
プロパティexecutorの値を設定します。 -
javax.managementでのExecutorの使用
Executor型のパラメータを持つjavax.managementのコンストラクタ コンストラクタ 説明 NotificationBroadcasterSupport(Executor executor)
NotificationBroadcasterSupportを構築します。ここで、各リスナーは指定したExecutor
を使って呼び出されます。NotificationBroadcasterSupport(Executor executor, MBeanNotificationInfo... info)
送信可能な通知に関する情報を使って、NotificationBroadcasterSupportを構築します。各リスナーは、指定したExecutor
を使って呼び出されます。 -
javax.xml.wsでのExecutorの使用
Executorを返すjavax.xml.wsのメソッド 修飾子と型 メソッド 説明 abstract Executor
Endpoint. getExecutor()
このEndpoint
インスタンスのexecutorを返します。Executor
Service. getExecutor()
このService
インスタンスのexecutorを返します。Executor型のパラメータを持つjavax.xml.wsのメソッド 修飾子と型 メソッド 説明 abstract void
Endpoint. setExecutor(Executor executor)
このEndpoint
インスタンスのexecutorを設定します。void
Service. setExecutor(Executor executor)
このService
インスタンスのexecutorを設定します。 -
javax.xml.ws.spiでのExecutorの使用
Executorを返すjavax.xml.ws.spiのメソッド 修飾子と型 メソッド 説明 abstract Executor
ServiceDelegate. getExecutor()
このService
インスタンスのexecutorを返します。Executor型のパラメータを持つjavax.xml.ws.spiのメソッド 修飾子と型 メソッド 説明 abstract void
ServiceDelegate. setExecutor(Executor executor)
このService
インスタンスのexecutorを設定します。 -
jdk.incubator.httpでのExecutorの使用
Executorを戻すjdk.incubator.httpのメソッド 修飾子と型 メソッド 説明 abstract Executor
HttpClient. executor()
このクライアントに設定されたExecutor
を返します。型Executorのパラメータを持つjdk.incubator.httpのメソッド 修飾子と型 メソッド 説明 abstract HttpClient.Builder
HttpClient.Builder. executor(Executor executor)
非同期タスクに使用されるエグゼキュータを設定します。
-