Interface IExecutorServiceFactory

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface IExecutorServiceFactory
    Factory for creating ExecutorService instances.
    Author:
    Philip Helger
    • Method Detail

      • getExecutorService

        @Nonnull
        ExecutorService getExecutorService​(@Nonnegative
                                           int nParallelTasks)
        Get an ExecutorService for the given number of parallel tasks. It is up to the implementation to interpret the value or not. The number of parallel tasks can therefore considered a hint to the implementation.
        Parameters:
        nParallelTasks - The number of parallel tasks to perform. Needs to be > 0.
        Returns:
        A non-null ExecutorService object.