use of io.vertx.mysqlclient.MySQLPool in project quarkus by quarkusio.
the class ReactiveMySQLDataSourcesHealthCheck method init.
@PostConstruct
protected void init() {
ArcContainer container = Arc.container();
DataSourcesHealthSupport excluded = container.instance(DataSourcesHealthSupport.class).get();
Set<String> excludedNames = excluded.getExcludedNames();
for (InstanceHandle<MySQLPool> handle : container.select(MySQLPool.class, Any.Literal.INSTANCE).handles()) {
String poolName = getPoolName(handle.getBean());
if (!excludedNames.contains(poolName)) {
addPool(poolName, handle.get());
}
}
}
use of io.vertx.mysqlclient.MySQLPool in project quarkus by quarkusio.
the class MySQLPoolRecorder method configureMySQLPool.
public RuntimeValue<MySQLPool> configureMySQLPool(RuntimeValue<Vertx> vertx, Supplier<Integer> eventLoopCount, String dataSourceName, DataSourcesRuntimeConfig dataSourcesRuntimeConfig, DataSourcesReactiveRuntimeConfig dataSourcesReactiveRuntimeConfig, DataSourcesReactiveMySQLConfig dataSourcesReactiveMySQLConfig, ShutdownContext shutdown) {
MySQLPool mysqlPool = initialize(vertx.getValue(), eventLoopCount.get(), dataSourcesRuntimeConfig.getDataSourceRuntimeConfig(dataSourceName), dataSourcesReactiveRuntimeConfig.getDataSourceReactiveRuntimeConfig(dataSourceName), dataSourcesReactiveMySQLConfig.getDataSourceReactiveRuntimeConfig(dataSourceName));
shutdown.addShutdownTask(mysqlPool::close);
return new RuntimeValue<>(mysqlPool);
}
Aggregations