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:
java.util.concurrent.CompletionService<T>

public class BlurExecutorCompletionService<T>
extends java.util.concurrent.ExecutorCompletionService<T>


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

Constructor Detail

BlurExecutorCompletionService

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

cancelAll

public void cancelAll()

getRemainingCount

public int getRemainingCount()

poll

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

poll

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

submit

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

submit

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

take

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

poll

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

getResultThrowException

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


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