@Component
public class BlacklistRuleHandlerProxy {
private final static ExecutorService EXECUTOR_SERVICE;
static {
EXECUTOR_SERVICE = Executors.newFixedThreadPool(10, new ThreadFactory() {
private AtomicInteger count = new AtomicInteger(0);
@Override
public Thread newThread(@NotNull Runnable r) {
int i = count.incrementAndGet();
Thread t = new Thread(r);
t.setDaemon(true);
t.setName("blacklist-"+i);
return t;
}
});
}
}