インタフェースjava.util.concurrent.Future
の使用
-
Futureを使用するパッケージ パッケージ 説明 java.nio.channels 入出力操作を実行できるエンティティ(ファイル、ソケットなど)への接続を表すチャネルや、多重化された非ブロック入出力操作用のセレクタを定義します。java.util.concurrent 並行プログラミングでよく使用されるユーティリティ・クラスです。javafx.concurrent javafx.taskのクラスのセットを提供します。javax.swing すべてのプラットフォーム上で可能なかぎり同じように機能する「軽量」(Java共通言語)コンポーネントのセットを提供します。javax.xml.ws このパッケージは、コアJAX-WS APIを含みます。 -
-
java.nio.channelsでのFutureの使用
Futureを返すjava.nio.channelsのメソッド 修飾子と型 メソッド 説明 abstract Future<AsynchronousSocketChannel>
AsynchronousServerSocketChannel. accept()
接続を受け入れます。abstract Future<Void>
AsynchronousSocketChannel. connect(SocketAddress remote)
このチャネルを接続します。Future<FileLock>
AsynchronousFileChannel. lock()
このチャネルのファイル上に排他ロックを設定します。abstract Future<FileLock>
AsynchronousFileChannel. lock(long position, long size, boolean shared)
このチャネルのファイルの指定された領域をロックします。Future<Integer>
AsynchronousByteChannel. read(ByteBuffer dst)
このチャネルのバイト・シーケンスを指定のバッファに読み込みます。abstract Future<Integer>
AsynchronousFileChannel. read(ByteBuffer dst, long position)
このチャネルのバイト・シーケンスを、指定されたファイル位置からバッファに読み込みます。abstract Future<Integer>
AsynchronousSocketChannel. read(ByteBuffer dst)
Future<Integer>
AsynchronousByteChannel. write(ByteBuffer src)
このチャネルのバイト・シーケンスを指定のバッファから書き出します。abstract Future<Integer>
AsynchronousFileChannel. write(ByteBuffer src, long position)
指定されたバッファのバイト・シーケンスをこのチャネルの指定されたファイル位置に書き込みます。abstract Future<Integer>
AsynchronousSocketChannel. write(ByteBuffer src)
-
java.util.concurrentでのFutureの使用
java.util.concurrentでのFutureのサブインタフェース 修飾子と型 インタフェース 説明 interface
RunnableFuture<V>
interface
RunnableScheduledFuture<V>
Runnable
であるScheduledFuture
です。interface
ScheduledFuture<V>
取消し可能な、遅延された結果生成アクションです。Futureを実装しているjava.util.concurrentのクラス 修飾子と型 クラス 説明 class
CompletableFuture<T>
明示的に(その値とステータスを設定して)完了できるFuture
です。その完了時に発生する依存関数およびアクションをサポートし、CompletionStage
として使用できます。class
CountedCompleter<T>
トリガーされた時点で保留中のアクションが残っていない場合に実行される完了アクションを含むForkJoinTask
です。class
ForkJoinTask<V>
ForkJoinPool
内で実行する抽象基底クラスです。class
FutureTask<V>
取消し可能な非同期計算です。class
RecursiveAction
結果の出ない再帰的なForkJoinTask
。class
RecursiveTask<V>
結果を生成する再帰的なForkJoinTask
。Futureを返すjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 Future<V>
CompletionService. poll()
次の完了済みタスクを表すFutureを取得して削除します。何も存在しない場合はnull
を返します。Future<V>
CompletionService. poll(long timeout, TimeUnit unit)
次の完了済みタスクを表すFutureを取得して削除します。何も存在しない場合は、必要に応じて指定された待機時間まで待機します。Future<?>
AbstractExecutorService. submit(Runnable task)
<T> Future<T>
AbstractExecutorService. submit(Runnable task, T result)
<T> Future<T>
AbstractExecutorService. submit(Callable<T> task)
Future<V>
CompletionService. submit(Runnable task, V result)
実行用のRunnableタスクを送信し、そのタスクを表すFutureを返します。Future<V>
CompletionService. submit(Callable<V> task)
値を返す実行用タスクを送信して、保留状態のタスク結果を表すFutureを返します。Future<V>
ExecutorCompletionService. submit(Runnable task, V result)
Future<V>
ExecutorCompletionService. submit(Callable<V> task)
Future<?>
ExecutorService. submit(Runnable task)
実行用のRunnableタスクを送信し、そのタスクを表すFutureを返します。<T> Future<T>
ExecutorService. submit(Runnable task, T result)
実行用のRunnableタスクを送信し、そのタスクを表すFutureを返します。<T> Future<T>
ExecutorService. submit(Callable<T> task)
値を返す実行用タスクを送信して、保留状態のタスク結果を表すFutureを返します。Future<?>
ScheduledThreadPoolExecutor. submit(Runnable task)
<T> Future<T>
ScheduledThreadPoolExecutor. submit(Runnable task, T result)
<T> Future<T>
ScheduledThreadPoolExecutor. submit(Callable<T> task)
Future<V>
CompletionService. take()
次の完了済みタスクを表すFutureを取得して削除します。何も存在しない場合は待機します。Future型の引数を持つ型を返すjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 <T> List<Future<T>>
ExecutorService. invokeAll(Collection<? extends Callable<T>> tasks)
指定されたタスクを実行し、すべて完了すると、ステータスと結果を含むFutureのリストを返します。<T> List<Future<T>>
ExecutorService. invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
指定されたタスクを実行し、すべてが完了するか時間切れになるか、そのいずれかが最初に発生した時点で、ステータスと結果を含むFutureのリストを返します。<T> List<Future<T>>
ForkJoinPool. invokeAll(Collection<? extends Callable<T>> tasks)
Future型の型引数を持つjava.util.concurrentのコンストラクタ・パラメータ コンストラクタ 説明 ExecutorCompletionService(Executor executor, BlockingQueue<Future<V>> completionQueue)
基本タスクの実行用に指定されたexecutorを使用し、完了キューとして指定されたキューを使用して、ExecutorCompletionServiceを作成します。 -
javafx.concurrentでのFutureの使用
Futureを実装しているjavafx.concurrentのクラス 修飾子と型 クラス 説明 class
Task<V>
FutureTask
の完全に監視可能な実装。 -
javax.swingでのFutureの使用
Futureを実装しているjavax.swingのクラス 修飾子と型 クラス 説明 class
SwingWorker<T,V>
GUIとやりとりする時間のかかるタスクを、バックグラウンド・スレッドで実行するための抽象クラスです。 -
javax.xml.wsでのFutureの使用
javax.xml.wsでのFutureのサブインタフェース 修飾子と型 インタフェース 説明 interface
Response<T>
Response
インタフェースは、操作呼出しの応答として送信されたメッセージのペイロードとコンテキストを取得するメソッドを提供します。Futureを返すjavax.xml.wsのメソッド 修飾子と型 メソッド 説明 Future<?>
Dispatch. invokeAsync(T msg, AsyncHandler<T> handler)
サービス操作を非同期的に呼び出します。
-