public interface Completion<V> extends Future<V>
Completion is a Future which also allows registration into
a completion queue. By polling results from the completion queue (which can
be blocking), multiple asynchronous methods can be
tracked. The queue implementation must be thread-safe, and an ideal choice
is LinkedBlockingQueue.| Modifier and Type | Method and Description |
|---|---|
void |
register(Queue<? super Completion<V>> completionQueue)
Registers this future such that it enqueues itself into the given queue
when done.
|
void register(Queue<? super Completion<V>> completionQueue)
completionQueue - thread-safe queue to receive finished
asynchronous resultsIllegalArgumentException - if completion queue argument is nullIllegalStateException - if already registered with a completion queueCopyright © 2006–2015 Cojen. All rights reserved.