Package io.deephaven.kv.inmem
Class KVExecutorServiceShortLived
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
io.deephaven.kv.inmem.KVExecutorServiceShortLived
- All Implemented Interfaces:
Executor,ExecutorService
An
ExecutorService built with a thread factory that creates daemon threads,
thus the executor doesn't need to be shutdown.
The ExecutorService will scale from 0 - 8 core threads, each which will timeout after
120 seconds of idling. If all 8 core threads are busy, the task will be queued in an unbounded
queue. See ThreadPoolExecutor for more details about thread and queueing semantics.
Due to the nature of unbounded queues, callers should prefer to execute tasks where they can monitor their own timeout as appropriate.
The number of threads and keepalive timeout can be changed by setting the system properties
io.deephaven.kv.KVExecutorServiceShortLived.threads and
io.deephaven.kv.KVExecutorServiceShortLived.keepalive_seconds.
This is intended for in-memory implementations, where there may be multiple kv instances, especially for unit tests.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, execute, 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, toStringMethods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
Constructor Details
-
KVExecutorServiceShortLived
public KVExecutorServiceShortLived()
-