It would be helpful if the setters in HikariConfig were chainable (i.e. returned this) so that several properties could be set without repeating the variable name. Instead of:
final HikariConfig config = new HikariConfig();
config.setMinimumIdle(...);
config.setMaximumPoolSize(...);
config.setMaxLifetime(...);
config.setDriverClassName(...);
config.setJdbcUrl(...);
config.setUsername(...);
config.setPassword(...);
we would be able to do:
final HikariConfig config = new HikariConfig()
.setMinimumIdle(...)
.setMaximumPoolSize(...)
.setMaxLifetime(...)
.setDriverClassName(...)
.setJdbcUrl(...)
.setUsername(...)
.setPassword(...);
Alternatively if the signature of the existing setters cannot be changed, new methods could be added without the set prefix:
final HikariConfig config = new HikariConfig()
.minimumIdle(...)
.maximumPoolSize(...)
.maxLifetime(...)
.driverClassName(...)
.jdbcUrl(...)
.username(...)
.password(...);
It would be helpful if the setters in
HikariConfigwere chainable (i.e. returnedthis) so that several properties could be set without repeating the variable name. Instead of:we would be able to do:
Alternatively if the signature of the existing setters cannot be changed, new methods could be added without the
setprefix: