diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryDatabase.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryDatabase.java index 0a0af5077..e506425f3 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryDatabase.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryDatabase.java @@ -17,4 +17,10 @@ public class ConfigCategoryDatabase { @Setting(value = "Table_Prefix", comment = "The Prefix that will be used for tables in your DB") private String tablePrefix; + + @Setting(value = "Max_Connections", comment = "This setting is the max simultaneous MySQL/MariaDB connections allowed at a time, this needs to be high enough to support multiple player logins in quick succession") + private ConfigCategoryMaxConnections configCategoryMaxConnections; + + @Setting(value = "Max_Pool_Size", comment = "This setting is the max size of the pool of cached connections that we hold at any given time.") + private ConfigCategoryMaxPoolSize configCategoryMaxPoolSize; } diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryMaxConnections.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryMaxConnections.java new file mode 100644 index 000000000..6e575c694 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryMaxConnections.java @@ -0,0 +1,18 @@ +package com.gmail.nossr50.config.hocon.database; + +import ninja.leaping.configurate.objectmapping.Setting; +import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; + +@ConfigSerializable +public class ConfigCategoryMaxConnections { + + @Setting(value = "Misc") + private int misc; + + @Setting(value = "Load") + private int load; + + @Setting(value = "Save") + private int save; + +} diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryMaxPoolSize.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryMaxPoolSize.java new file mode 100644 index 000000000..797175082 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigCategoryMaxPoolSize.java @@ -0,0 +1,16 @@ +package com.gmail.nossr50.config.hocon.database; + +import ninja.leaping.configurate.objectmapping.Setting; +import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; + +@ConfigSerializable +public class ConfigCategoryMaxPoolSize { + @Setting(value = "Misc") + private int misc; + + @Setting(value = "Load") + private int load; + + @Setting(value = "Save") + private int save; +}