Class SearchIndexerImpl.WorkerThreadPool

  • Enclosing class:
    SearchIndexerImpl

    public static class SearchIndexerImpl.WorkerThreadPool
    extends Object
    A thread pool for handling many small units of work submitted by a task. The task is notified as each unit completes. If no thread is available for a work unit, the thread of the task itself will run it. This provides automatic throttling. Only one task is active at a time, so the task can simply wait until this pool is idle to know that all of its units have completed. When shutting down, no attempt is made to interrupt the currently executing work units, since they are assumed to be small.
    • Constructor Detail

      • WorkerThreadPool

        public WorkerThreadPool​(int threadPoolSize)
    • Method Detail

      • waitUntilIdle

        public void waitUntilIdle()
      • shutdown

        public void shutdown()