Virtual Threads for database caching

This commit is contained in:
HaHaWTH
2024-03-28 15:21:22 +08:00
parent a93f0546e3
commit 6a96d993e1
3 changed files with 43 additions and 11 deletions
@@ -19,6 +19,10 @@ public final class DatabaseSettings implements SettingsHolder {
public static final Property<Boolean> USE_CACHING =
newProperty("DataSource.caching", true);
@Comment("Should we try to use VirtualThreads(Java 21+) for database cache loader?")
public static final Property<Boolean> USE_VIRTUAL_THREADS =
newProperty("DataSource.useVirtualThreadsCache", false);
@Comment("Database host address")
public static final Property<String> MYSQL_HOST =
newProperty("DataSource.mySQLHost", "127.0.0.1");