org.apache.camel.util.concurrent
Class SubmitOrderedCompletionService<V>

java.lang.Object
  extended by org.apache.camel.util.concurrent.SubmitOrderedCompletionService<V>
All Implemented Interfaces:
CompletionService<V>

public class SubmitOrderedCompletionService<V>
extends Object
implements CompletionService<V>

A CompletionService that orders the completed tasks in the same order as they where submitted.

Version:
$Revision: 795369 $

Constructor Summary
SubmitOrderedCompletionService(Executor executor)
           
 
Method Summary
 Future<V> poll()
           
 Future<V> poll(long timeout, TimeUnit unit)
           
 Future<V> submit(Callable task)
           
 Future<V> submit(Runnable task, Object result)
           
 Future<V> take()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubmitOrderedCompletionService

public SubmitOrderedCompletionService(Executor executor)
Method Detail

submit

public Future<V> submit(Callable task)
Specified by:
submit in interface CompletionService<V>

submit

public Future<V> submit(Runnable task,
                        Object result)
Specified by:
submit in interface CompletionService<V>

take

public Future<V> take()
               throws InterruptedException
Specified by:
take in interface CompletionService<V>
Throws:
InterruptedException

poll

public Future<V> poll()
Specified by:
poll in interface CompletionService<V>

poll

public Future<V> poll(long timeout,
                      TimeUnit unit)
               throws InterruptedException
Specified by:
poll in interface CompletionService<V>
Throws:
InterruptedException


Apache CAMEL