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 of QueryProcessingPool that 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 Details

    • NoopQueryProcessingPool

      public NoopQueryProcessingPool()
  • Method Details

    • 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: QueryProcessingPool
      Submits the query execution unit task for asynchronous execution.
      Specified by:
      submitRunnerTask in interface QueryProcessingPool
      Type Parameters:
      T - - Task result type
      V - - Query runner sequence type
      Parameters:
      task - - Task to be submitted.
      Returns:
      - Future object for tracking the task completion.
    • submitRunnerTask

      public <T, V> com.google.common.util.concurrent.ListenableFuture<T> submitRunnerTask(PrioritizedQueryRunnerCallable<T,V> task, long timeout, TimeUnit unit)
      Description copied from interface: QueryProcessingPool
      Submits the query execution task for asynchronous execution, with a provided timeout.
      Specified by:
      submitRunnerTask in interface QueryProcessingPool
      Type Parameters:
      T - - Task result type
      V - - Query runner sequence type
      Parameters:
      task - - Task to be submitted.
      timeout - - Timeout value
      unit - - Timeout unit
      Returns:
      - Future object for tracking the task completion.
    • submit

      public <T> com.google.common.util.concurrent.ListenableFuture<T> submit(Callable<T> callable)
      Specified by:
      submit in interface ExecutorService
      Specified by:
      submit in interface com.google.common.util.concurrent.ListeningExecutorService
    • submit

      public com.google.common.util.concurrent.ListenableFuture<?> submit(Runnable runnable)
      Specified by:
      submit in interface ExecutorService
      Specified by:
      submit in interface com.google.common.util.concurrent.ListeningExecutorService
    • submit

      public <T> com.google.common.util.concurrent.ListenableFuture<T> submit(Runnable runnable, T t)
      Specified by:
      submit in interface ExecutorService
      Specified by:
      submit in interface com.google.common.util.concurrent.ListeningExecutorService
    • invokeAll

      public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection)
      Specified by:
      invokeAll in interface ExecutorService
      Specified by:
      invokeAll in interface com.google.common.util.concurrent.ListeningExecutorService
    • invokeAll

      public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)
      Specified by:
      invokeAll in interface ExecutorService
      Specified by:
      invokeAll in interface com.google.common.util.concurrent.ListeningExecutorService
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface ExecutorService
    • shutdownNow

      public List<Runnable> shutdownNow()
      Specified by:
      shutdownNow in interface ExecutorService
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface ExecutorService
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface ExecutorService
    • awaitTermination

      public boolean awaitTermination(long l, TimeUnit timeUnit)
      Specified by:
      awaitTermination in interface ExecutorService
    • invokeAny

      public <T> T invokeAny(Collection<? extends Callable<T>> collection)
      Specified by:
      invokeAny in interface ExecutorService
    • invokeAny

      public <T> T invokeAny(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)
      Specified by:
      invokeAny in interface ExecutorService
    • execute

      public void execute(Runnable runnable)
      Specified by:
      execute in interface Executor