Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"description": "Dependencies whose updates shouldn't be done automatically",
"matchPackageNames": [
"azul-zulu", // we update our target java version manually
"com.h2database:h2", // breaks old database files & support will be removed in a future release anyway
"cpw.mods:modlauncher", // can be removed when sponge updated to v9
"org.spongepowered:spongeapi", // we want to leave the oldest version we support as the dependency
"io.github.juliarn:npc-lib-**", // currently unstable and will be updated manually
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package eu.cloudnetservice.cloudnet.gradle.util
object Files {

const val driver = "driver.jar"
const val common = "common.jar"
const val wrapper = "wrapper.jar"
const val launcher = "launcher.jar"
const val launcherPatcher = "launcher-patcher.jar"
Expand All @@ -33,10 +32,9 @@ object Files {
const val cloudflare = "cloudnet-cloudflare.jar"
const val dockerizedServices = "cloudnet-dockerized-services.jar"
const val databaseMongo = "cloudnet-database-mongodb.jar"
const val databaseMysql = "cloudnet-database-mysql.jar"
const val databaseSql = "cloudnet-database-sql.jar"
const val labymod = "cloudnet-labymod.jar"
const val npcs = "cloudnet-npcs.jar"
const val rest = "cloudnet-rest.jar"
const val signs = "cloudnet-signs.jar"
const val smart = "cloudnet-smart.jar"
const val syncproxy = "cloudnet-syncproxy.jar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@
*/
public interface DatabaseProvider {

/**
* Gets if this database provider produces databases that are synced to the cluster. This means that every change made
* to the database will be directly visible to all components in the cluster rather than requiring a special sync.
* Normally synced databases are databases which are running as an external process, like MySQL or MongoDB.
*
* @return true if all modify operations are directly visible to all components in a cluster, false otherwise.
*/
boolean synced();
Comment thread
0utplay marked this conversation as resolved.
Resolved

/**
* Retrieves or creates non-blocking a facade for a database to write and read data to. The name of the database
* should be unique for later identification.
Expand Down
12 changes: 9 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ stringSimilarity = "2.0.0"
cloudConfirmation = "1.0.0-rc.1"

# databases
h2 = "1.4.197" # do not update, leads to database incompatibility
jooq = "3.20.10"
xodus = "2.0.1"
mongodb = "5.15.0"
hikariCp = "7.1.0"
mysqlConnector = "26.10.0"
sqliteConnector = "3.51.1.0"
postgresqlConnector = "42.7.9"
mariadbConnector = "3.5.7"

# general
oshi = "7.8.0"
Expand Down Expand Up @@ -158,11 +161,14 @@ aerogelAuto = { group = "dev.derklaro.aerogel", name = "aerogel-auto", version.r
aerogelScopedValues = { group = "dev.derklaro.aerogel", name = "aerogel-scoped-value-context-scope", version.ref = "aerogel" }

# databases
h2 = { group = "com.h2database", name = "h2", version.ref = "h2" }
jooq = { group = "org.jooq", name = "jooq", version.ref = "jooq" }
hikariCp = { group = "com.zaxxer", name = "HikariCP", version.ref = "hikariCp" }
mongodb = { group = "org.mongodb", name = "mongodb-driver-sync", version.ref = "mongodb" }
xodus = { group = "org.jetbrains.xodus", name = "xodus-environment", version.ref = "xodus" }
mysqlConnector = { group = "com.mysql", name = "mysql-connector-j", version.ref = "mysqlConnector" }
sqliteConnector = { group = "org.xerial", name = "sqlite-jdbc", version.ref = "sqliteConnector" }
postgresqlConnector = { group = "org.postgresql", name = "postgresql", version.ref = "postgresqlConnector" }
mariadbConnector = { group = "org.mariadb.jdbc", name = "mariadb-java-client", version.ref = "mariadbConnector" }

# platform api
nukkitX = { group = "cn.nukkit", name = "nukkit", version.ref = "nukkitX" }
Expand Down Expand Up @@ -203,7 +209,7 @@ aerogel = ["aerogel", "aerogelScopedValues", "aerogelAuto"]
aerogelApi = ["aerogel", "aerogelAuto"]
npcLib = ["npcLib", "npcLibLabymod"]
unirest = ["unirest", "unirestGson"]
mysql = ["mysqlConnector", "hikariCp"]
sql = ["mysqlConnector", "hikariCp", "postgresqlConnector", "sqliteConnector", "mariadbConnector", "jooq"]
jline = ["jlineReader", "jlineTerminal"]
cloud = ["cloudCore", "cloudAnnotations", "cloudConfirmationProcessor"]
cloudApi = ["cloudCoreApi", "cloudAnnotationsApi", "cloudConfirmationProcessor"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
import lombok.NonNull;
import org.bson.conversions.Bson;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -169,11 +168,6 @@ public boolean delete(@NonNull String key) {
return entries;
}

@Override
public void iterate(@NonNull BiConsumer<String, Document> consumer) {
this.entries().forEach(consumer);
}

@Override
public void clear() {
this.collection.deleteMany(new org.bson.Document());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public boolean init() {
return true;
}

@Override
public boolean synced() {
return true;
}

@Override
public @NonNull LocalDatabase database(@NonNull String name) {
return this.databaseCache.get(name, $ -> {
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading