Compare commits

...

4 Commits

Author SHA1 Message Date
Auxilor
af91c9d659 Updated to 6.13.9 2021-11-14 13:43:29 +00:00
Auxilor
89eaaf3a5e Updated annotations and jupiter 2021-11-14 13:43:00 +00:00
Auxilor
ab174e2d41 Added configurability to MySQL threads 2021-11-14 13:42:24 +00:00
Auxilor
cfa9badc1e Limited SQL threads to 2 for socket connection limit 2021-11-14 13:41:11 +00:00
4 changed files with 8 additions and 4 deletions

View File

@@ -60,10 +60,10 @@ allprojects {
} }
dependencies { dependencies {
compileOnly 'org.jetbrains:annotations:19.0.0' compileOnly 'org.jetbrains:annotations:23.0.0'
// Test // Test
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
} }

View File

@@ -20,7 +20,7 @@ class MySQLDataHandler(
) : DataHandler { ) : DataHandler {
private val columns = mutableMapOf<String, Column<*>>() private val columns = mutableMapOf<String, Column<*>>()
private val threadFactory = ThreadFactoryBuilder().setNameFormat("eco-mysql-thread-%d").build() private val threadFactory = ThreadFactoryBuilder().setNameFormat("eco-mysql-thread-%d").build()
private val executor = Executors.newCachedThreadPool(threadFactory) private val executor = Executors.newFixedThreadPool(plugin.configYml.getInt("mysql.threads"), threadFactory)
init { init {
Database.connect( Database.connect(

View File

@@ -5,6 +5,10 @@
mysql: mysql:
enabled: false # Set to false, data.yml will be used instead. enabled: false # Set to false, data.yml will be used instead.
# How many threads to execute statements on. Higher numbers can be faster however
# very high numbers can cause issues with OS configuration. If writes are taking
# too long, increase this value.
threads: 2
host: localhost host: localhost
port: 3306 port: 3306
database: database database: database

View File

@@ -1,2 +1,2 @@
version = 6.13.8 version = 6.13.9
plugin-name = eco plugin-name = eco