Class MockSinglePrioritizingExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor
org.elasticsearch.cluster.coordination.MockSinglePrioritizingExecutor
- All Implemented Interfaces:
Executor
,ExecutorService
public class MockSinglePrioritizingExecutor
extends org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor
Mock single threaded
PrioritizedEsThreadPoolExecutor
based on DeterministicTaskQueue
,
simulating the behaviour of an executor returned by EsExecutors.newSinglePrioritizing(java.lang.String, java.util.concurrent.ThreadFactory, org.elasticsearch.common.util.concurrent.ThreadContext, java.util.concurrent.ScheduledExecutorService, org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor.StarvationWatcher)
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor
org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor.Pending, org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor.StarvationWatcher
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy
-
Constructor Summary
ConstructorDescriptionMockSinglePrioritizingExecutor
(String nodeName, String nodeId, DeterministicTaskQueue deterministicTaskQueue, org.elasticsearch.threadpool.ThreadPool threadPool) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterExecute
(Runnable r, Throwable t) boolean
awaitTermination
(long timeout, TimeUnit unit) Methods inherited from class org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor
beforeExecute, execute, getMaxTaskWaitTime, getNumberOfPendingTasks, getPending, newTaskFor, newTaskFor, unwrap, wrapRunnable
Methods inherited from class org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor
appendThreadPoolExecutorDetails, execute, getTasks, toString
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, terminated
-
Constructor Details
-
MockSinglePrioritizingExecutor
public MockSinglePrioritizingExecutor(String nodeName, String nodeId, DeterministicTaskQueue deterministicTaskQueue, org.elasticsearch.threadpool.ThreadPool threadPool)
-
-
Method Details
-
afterExecute
- Overrides:
afterExecute
in classorg.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor
-
awaitTermination
- Specified by:
awaitTermination
in interfaceExecutorService
- Overrides:
awaitTermination
in classThreadPoolExecutor
-