Interface ExecutorServiceProvider

    • Method Detail

      • createThreadPoolExecutor

        ExecutorService createThreadPoolExecutor​(String threadGroupName,
                                                 int poolSize)
        Creates a new ExecutorService instance.
        Parameters:
        threadGroupName - the thread group name
        poolSize - the thread pool size
        Returns:
        a new ExecutorService
      • createThreadScheduledExecutor

        ScheduledExecutorService createThreadScheduledExecutor​(String threadGroupName)
        Creates a new ScheduledExecutorService instance.
        Parameters:
        threadGroupName - the thread group name
        Returns:
        a new ScheduledExecutorService
      • getInstanceId

        default String getInstanceId()
        Returns the unique identifier for this instance. The value must be unique among different implementations. The default implementation is exactly the same with the default #toString() method. The reason why we have this method is to avoid unexpected side effect in the case where a developer customizes the #toString() method behavior.
        Returns:
        an instance ID