Skip to content

Commit

Permalink
new API
Browse files Browse the repository at this point in the history
  • Loading branch information
nPraml committed Oct 4, 2024
1 parent 3a10706 commit d34f73f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ebean-api/src/main/java/io/ebean/DatabaseBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down
2 changes: 2 additions & 0 deletions ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ public DatabaseConfig setBackgroundExecutorWrapper(BackgroundExecutorWrapper bac
/**
* Returns, if the caches are partitioned by tenant.
*/
@Override
public boolean isTenantPartitionedCache() {
return tenantPartitionedCache;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit d34f73f

Please sign in to comment.