org.apache.blur.utils
Class BlurExecutorCompletionService<T>
java.lang.Object
java.util.concurrent.ExecutorCompletionService<T>
org.apache.blur.utils.BlurExecutorCompletionService<T>
- All Implemented Interfaces:
- CompletionService<T>
public class BlurExecutorCompletionService<T>
- extends ExecutorCompletionService<T>
BlurExecutorCompletionService
public BlurExecutorCompletionService(Executor executor,
BlurExecutorCompletionService.Cancel cancel)
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.