All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.slack.api.util.thread.DaemonThreadExecutorServiceProvider Maven / Gradle / Ivy

There is a newer version: 1.44.1
Show newest version
package com.slack.api.util.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;

import static com.slack.api.util.thread.DaemonThreadExecutorServiceFactory.createDaemonThreadPoolExecutor;
import static com.slack.api.util.thread.DaemonThreadExecutorServiceFactory.createDaemonThreadScheduledExecutor;

public class DaemonThreadExecutorServiceProvider implements ExecutorServiceProvider {

    private static final DaemonThreadExecutorServiceProvider SINGLETON = new DaemonThreadExecutorServiceProvider();

    public static DaemonThreadExecutorServiceProvider getInstance() {
        return SINGLETON;
    }

    @Override
    public ExecutorService createThreadPoolExecutor(String threadGroupName, int poolSize) {
        return createDaemonThreadPoolExecutor(threadGroupName, poolSize);
    }

    @Override
    public ScheduledExecutorService createThreadScheduledExecutor(String threadGroupName) {
        return createDaemonThreadScheduledExecutor(threadGroupName);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy