Make the max pool size configurable
This commit is contained in:
@@ -130,7 +130,8 @@ public abstract class AbstractConfiguration<T extends LuckPermsPlugin> implement
|
||||
getString("data.address", null),
|
||||
getString("data.database", null),
|
||||
getString("data.username", null),
|
||||
getString("data.password", null)
|
||||
getString("data.password", null),
|
||||
getInt("data.pool-size", 10)
|
||||
);
|
||||
storageMethod = getString("storage-method", defaultStorage);
|
||||
splitStorage = getBoolean("split-storage.enabled", false);
|
||||
|
||||
@@ -33,5 +33,6 @@ public class DatastoreConfiguration implements me.lucko.luckperms.api.data.Datas
|
||||
private final String database;
|
||||
private final String username;
|
||||
private final String password;
|
||||
private int poolSize;
|
||||
|
||||
}
|
||||
|
||||
@@ -56,8 +56,9 @@ public class MySQLBacking extends SQLBacking {
|
||||
final String database = configuration.getDatabase();
|
||||
final String username = configuration.getUsername();
|
||||
final String password = configuration.getPassword();
|
||||
|
||||
config.setMaximumPoolSize(configuration.getPoolSize());
|
||||
|
||||
config.setMaximumPoolSize(10);
|
||||
config.setPoolName("luckperms");
|
||||
config.setDataSourceClassName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource");
|
||||
config.addDataSourceProperty("serverName", address.split(":")[0]);
|
||||
|
||||
Reference in New Issue
Block a user