Interface ThreadingConfig


public interface ThreadingConfig
Controls how threading will happen during comparison.
  • Method Details

    • createInstance

      static ThreadingConfig createInstance(boolean threadInput, Optional<ExecutorService> executorService)
      This is the factory method which should be used to create configured ThreadingConfig instances.
      Parameters:
      threadInput - Whether the input pipelines will be run concurrently.
      executorService - An optional ExecutorService may be passed for use when creating threads. Each comparator will create its own ExecutorService with 1 extra thread if threadInput is true and no ExecutorService is passed in.
      Returns:
      a ThreadingConfig instance suitable for configuring a comparator.
    • getExecutorService

      Optional<ExecutorService> getExecutorService()
      Get any passed in ExecutorService.
      Returns:
      any ExecutorService passed to createInstance(boolean, Optional). Internal ExecutorServices are not returned.
    • isInputProcessingMultithreaded

      boolean isInputProcessingMultithreaded()
      Will the input pipelines be run concurrently.
      Returns:
      the value passed as the threadInput parameter to createInstance(boolean, Optional).