Package org.apache.druid.query
Class NoopQueryProcessingPool
- java.lang.Object
-
- org.apache.druid.query.NoopQueryProcessingPool
-
- All Implemented Interfaces:
com.google.common.util.concurrent.ListeningExecutorService,Executor,ExecutorService,QueryProcessingPool
public class NoopQueryProcessingPool extends Object implements QueryProcessingPool
Implementation ofQueryProcessingPoolthat throws when any query execution task unit is submitted to it. It is semantically shutdown from the moment it is created, and since the shutdown methods are supposed to be idempotent, they do not throw like the execution methods
-
-
Constructor Summary
Constructors Constructor Description NoopQueryProcessingPool()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanawaitTermination(long l, TimeUnit timeUnit)voidexecute(Runnable runnable)static NoopQueryProcessingPoolinstance()<T> List<Future<T>>invokeAll(Collection<? extends Callable<T>> collection)<T> List<Future<T>>invokeAll(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)<T> TinvokeAny(Collection<? extends Callable<T>> collection)<T> TinvokeAny(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)booleanisShutdown()booleanisTerminated()voidshutdown()List<Runnable>shutdownNow()com.google.common.util.concurrent.ListenableFuture<?>submit(Runnable runnable)<T> com.google.common.util.concurrent.ListenableFuture<T>submit(Runnable runnable, T t)<T> com.google.common.util.concurrent.ListenableFuture<T>submit(Callable<T> callable)<T,V>
com.google.common.util.concurrent.ListenableFuture<T>submitRunnerTask(PrioritizedQueryRunnerCallable<T,V> task)Submits the query execution unit task for asynchronous execution.
-
-
-
Method Detail
-
instance
public static NoopQueryProcessingPool instance()
-
submitRunnerTask
public <T,V> com.google.common.util.concurrent.ListenableFuture<T> submitRunnerTask(PrioritizedQueryRunnerCallable<T,V> task)
Description copied from interface:QueryProcessingPoolSubmits the query execution unit task for asynchronous execution.- Specified by:
submitRunnerTaskin interfaceQueryProcessingPool- Type Parameters:
T- - Task result typeV- - Query runner sequence type- Parameters:
task- - Task to be submitted.- Returns:
- - Future object for tracking the task completion.
-
submit
public <T> com.google.common.util.concurrent.ListenableFuture<T> submit(Callable<T> callable)
- Specified by:
submitin interfaceExecutorService- Specified by:
submitin interfacecom.google.common.util.concurrent.ListeningExecutorService
-
submit
public com.google.common.util.concurrent.ListenableFuture<?> submit(Runnable runnable)
- Specified by:
submitin interfaceExecutorService- Specified by:
submitin interfacecom.google.common.util.concurrent.ListeningExecutorService
-
submit
public <T> com.google.common.util.concurrent.ListenableFuture<T> submit(Runnable runnable, T t)
- Specified by:
submitin interfaceExecutorService- Specified by:
submitin interfacecom.google.common.util.concurrent.ListeningExecutorService
-
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection)
- Specified by:
invokeAllin interfaceExecutorService- Specified by:
invokeAllin interfacecom.google.common.util.concurrent.ListeningExecutorService
-
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)
- Specified by:
invokeAllin interfaceExecutorService- Specified by:
invokeAllin interfacecom.google.common.util.concurrent.ListeningExecutorService
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceExecutorService
-
shutdownNow
public List<Runnable> shutdownNow()
- Specified by:
shutdownNowin interfaceExecutorService
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdownin interfaceExecutorService
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfaceExecutorService
-
awaitTermination
public boolean awaitTermination(long l, TimeUnit timeUnit)- Specified by:
awaitTerminationin interfaceExecutorService
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> collection)
- Specified by:
invokeAnyin interfaceExecutorService
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)
- Specified by:
invokeAnyin interfaceExecutorService
-
-