Interface ThreadingConfig
public interface ThreadingConfig
Controls how threading will happen during comparison.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadingConfigcreateInstance(boolean threadInput, Optional<ExecutorService> executorService) This is the factory method which should be used to create configured ThreadingConfig instances.Get any passed inExecutorService.booleanWill the input pipelines be run concurrently.
-
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 optionalExecutorServicemay 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 inExecutorService.- Returns:
- any
ExecutorServicepassed tocreateInstance(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).
-