From d34f73f940362f89a19b3a622121c7aa82536acb Mon Sep 17 00:00:00 2001 From: Noemi Praml Date: Fri, 4 Oct 2024 16:26:02 +0200 Subject: [PATCH] new API --- ebean-api/src/main/java/io/ebean/DatabaseBuilder.java | 11 +++++++++++ .../src/main/java/io/ebean/config/DatabaseConfig.java | 2 ++ 2 files changed, 13 insertions(+) diff --git a/ebean-api/src/main/java/io/ebean/DatabaseBuilder.java b/ebean-api/src/main/java/io/ebean/DatabaseBuilder.java index 985ba1760e..e0269c26b8 100644 --- a/ebean-api/src/main/java/io/ebean/DatabaseBuilder.java +++ b/ebean-api/src/main/java/io/ebean/DatabaseBuilder.java @@ -896,6 +896,12 @@ default DatabaseBuilder backgroundExecutorWrapper(BackgroundExecutorWrapper back @Deprecated DatabaseBuilder setBackgroundExecutorWrapper(BackgroundExecutorWrapper backgroundExecutorWrapper); + /** + * Sets the tenant partitioning mode for caches. This means, caches are created on demand, + * but they may not get invalidated across tenant boundaries * + */ + void setTenantPartitionedCache(boolean tenantPartitionedCache); + /** * Set the L2 cache default max size. */ @@ -2563,6 +2569,11 @@ interface Settings extends DatabaseBuilder { */ boolean isAutoPersistUpdates(); + /** + * Returns, if the caches are partitioned by tenant. + */ + boolean isTenantPartitionedCache(); + /** * Return the L2 cache default max size. */ diff --git a/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java b/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java index 9fa2519f69..5fbab9a1f9 100644 --- a/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java +++ b/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java @@ -1205,6 +1205,7 @@ public DatabaseConfig setBackgroundExecutorWrapper(BackgroundExecutorWrapper bac /** * Returns, if the caches are partitioned by tenant. */ + @Override public boolean isTenantPartitionedCache() { return tenantPartitionedCache; } @@ -1213,6 +1214,7 @@ public boolean isTenantPartitionedCache() { * Sets the tenant partitioning mode for caches. This means, caches are created on demand, * but they may not get invalidated across tenant boundaries * */ + @Override public void setTenantPartitionedCache(boolean tenantPartitionedCache) { this.tenantPartitionedCache = tenantPartitionedCache; }