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

com.yesql4j.reactor.Yesql4jSchedulers Maven / Gradle / Ivy

There is a newer version: 0.1.8-beta
Show newest version
package com.yesql4j.reactor;

import io.vertx.mysqlclient.MySQLPool;
import reactor.core.scheduler.Scheduler;
import reactor.core.scheduler.Schedulers;

import java.util.concurrent.ConcurrentHashMap;

public final class Yesql4jSchedulers {

    private static ConcurrentHashMap schedulers = new ConcurrentHashMap<>();

    public static Scheduler scheduler(MySQLPool pool) {
        return schedulers.computeIfAbsent(pool, k -> Schedulers.boundedElastic());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy