io.quarkus.datasource.runtime.DataSourceSupport Maven / Gradle / Ivy
package io.quarkus.datasource.runtime;
import java.util.HashSet;
import java.util.Set;
/**
* Helper class that holds the names of all configured data sources,
* along with the names of those that are inactive or excluded from health checks.
*
* This is used by any feature that needs runtime access to data sources,
* e.g. Flyway/Liquibase or health check implementation classes.
*/
public class DataSourceSupport {
private final Set inactiveNames;
private final Set inactiveOrHealthCheckExcludedNames;
public DataSourceSupport(Set healthCheckExcludedNames,
Set inactiveNames) {
this.inactiveOrHealthCheckExcludedNames = new HashSet<>();
inactiveOrHealthCheckExcludedNames.addAll(inactiveNames);
inactiveOrHealthCheckExcludedNames.addAll(healthCheckExcludedNames);
this.inactiveNames = inactiveNames;
}
public Set getInactiveNames() {
return inactiveNames;
}
public Set getInactiveOrHealthCheckExcludedNames() {
return inactiveOrHealthCheckExcludedNames;
}
}