Class KVExecutorServiceShortLived

All Implemented Interfaces:
Executor, ExecutorService

public class KVExecutorServiceShortLived extends ThreadPoolExecutor
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.

  • Constructor Details

    • KVExecutorServiceShortLived

      public KVExecutorServiceShortLived()