org.apache.blur.utils
Class BlurExecutorCompletionService<T>

java.lang.Object
  extended by java.util.concurrent.ExecutorCompletionService<T>
      extended by org.apache.blur.utils.BlurExecutorCompletionService<T>
All Implemented Interfaces:
CompletionService<T>

public class BlurExecutorCompletionService<T>
extends ExecutorCompletionService<T>


Nested Class Summary
static interface BlurExecutorCompletionService.Cancel
           
 
Constructor Summary
BlurExecutorCompletionService(Executor executor, BlurExecutorCompletionService.Cancel cancel)
           
 
Method Summary
 void cancelAll()
           
 int getRemainingCount()
           
 T getResultThrowException(Future<T> future, Object... parameters)
           
 Future<T> poll()
           
 Future<T> poll(long timeout, TimeUnit unit)
           
 Future<T> poll(long timeout, TimeUnit unit, boolean throwExceptionIfTimeout, Object... parameters)
           
 Future<T> submit(Callable<T> task)
           
 Future<T> submit(Runnable task, T result)
           
 Future<T> take()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlurExecutorCompletionService

public BlurExecutorCompletionService(Executor executor,
                                     BlurExecutorCompletionService.Cancel cancel)
Method Detail

cancelAll

public void cancelAll()

getRemainingCount

public int getRemainingCount()

poll

public Future<T> poll()
Specified by:
poll in interface CompletionService<T>
Overrides:
poll in class ExecutorCompletionService<T>

poll

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

submit

public Future<T> submit(Callable<T> task)
Specified by:
submit in interface CompletionService<T>
Overrides:
submit in class ExecutorCompletionService<T>

submit

public Future<T> submit(Runnable task,
                        T result)
Specified by:
submit in interface CompletionService<T>
Overrides:
submit in class ExecutorCompletionService<T>

take

public Future<T> take()
               throws InterruptedException
Specified by:
take in interface CompletionService<T>
Overrides:
take in class ExecutorCompletionService<T>
Throws:
InterruptedException

poll

public Future<T> poll(long timeout,
                      TimeUnit unit,
                      boolean throwExceptionIfTimeout,
                      Object... parameters)
               throws BlurException
Throws:
BlurException

getResultThrowException

public T getResultThrowException(Future<T> future,
                                 Object... parameters)
                          throws BlurException
Throws:
BlurException


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.