Package org.elasticsearch.threadpool
Class FakeTimeThreadPool
java.lang.Object
org.elasticsearch.threadpool.ThreadPool
org.elasticsearch.threadpool.TestThreadPool
org.elasticsearch.threadpool.FakeTimeThreadPool
- All Implemented Interfaces:
Closeable,AutoCloseable,TimeProvider,org.elasticsearch.core.Releasable,ReportingService<ThreadPoolInfo>,Scheduler
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.threadpool.ThreadPool
ThreadPool.Info, ThreadPool.Names, ThreadPool.ThreadPoolTypeNested classes/interfaces inherited from interface org.elasticsearch.threadpool.Scheduler
Scheduler.Cancellable, Scheduler.ReschedulingRunnable, Scheduler.SafeScheduledThreadPoolExecutor, Scheduler.ScheduledCancellable -
Field Summary
Fields inherited from class org.elasticsearch.threadpool.ThreadPool
DEFAULT_INDEX_AUTOSCALING_EWMA_ALPHA, ESTIMATED_TIME_INTERVAL_SETTING, LATE_TIME_INTERVAL_WARN_THRESHOLD_SETTING, searchAutoscalingEWMA, SLOW_SCHEDULER_TASK_WARN_THRESHOLD_SETTING, THREAD_POOL_METRIC_NAME_ACTIVE, THREAD_POOL_METRIC_NAME_COMPLETED, THREAD_POOL_METRIC_NAME_CURRENT, THREAD_POOL_METRIC_NAME_LARGEST, THREAD_POOL_METRIC_NAME_QUEUE, THREAD_POOL_METRIC_NAME_QUEUE_TIME, THREAD_POOL_METRIC_NAME_REJECTED, THREAD_POOL_METRIC_NAME_UTILIZATION, THREAD_POOL_METRIC_PREFIX, THREAD_POOL_TYPES, WRITE_THREAD_POOLS_EWMA_ALPHA_SETTING -
Constructor Summary
ConstructorsConstructorDescriptionFakeTimeThreadPool(String name, long absoluteTimeOffset, ExecutorBuilder<?>... customBuilders) -
Method Summary
Modifier and TypeMethodDescriptionlonglongvoidsetCurrentTimeInMillis(long currentTimeInMillis) voidMethods inherited from class org.elasticsearch.threadpool.TestThreadPool
closeMethods inherited from class org.elasticsearch.threadpool.ThreadPool
assertCurrentMethodIsNotCalledRecursively, assertCurrentThreadPool, assertInSystemContext, assertNotScheduleThread, awaitTermination, builders, executor, generic, getMaxSnapshotThreadPoolSize, getThreadContext, info, info, oneEighthAllocatedProcessors, rawRelativeTimeInMillis, relativeTimeInMillisSupplier, relativeTimeInNanos, schedule, scheduler, scheduleUnlessShuttingDown, scheduleWithFixedDelay, searchOrGetThreadPoolSize, shutdown, shutdownNow, stats, stopCachedTimeThread, terminate, terminate
-
Constructor Details
-
FakeTimeThreadPool
public FakeTimeThreadPool() -
FakeTimeThreadPool
public FakeTimeThreadPool(String name, long absoluteTimeOffset, ExecutorBuilder<?>... customBuilders)
-
-
Method Details
-
relativeTimeInMillis
public long relativeTimeInMillis()- Specified by:
relativeTimeInMillisin interfaceTimeProvider- Overrides:
relativeTimeInMillisin classThreadPool
-
absoluteTimeInMillis
public long absoluteTimeInMillis()- Specified by:
absoluteTimeInMillisin interfaceTimeProvider- Overrides:
absoluteTimeInMillisin classThreadPool
-
setCurrentTimeInMillis
public void setCurrentTimeInMillis(long currentTimeInMillis) -
setRandomTime
public void setRandomTime()
-