mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-12 14:40:46 +00:00
#1258 - ENH: Add ServerConfig notifyL2CacheInForeground option ... was ServerCachePlugin BackgroundExecutor problem
This commit is contained in:
1 parent
5237e8ba66
commit
a5c6f483b0
6 files changed
+47
-9
No files matched your search
@@ -86,7 +86,7 @@ public final class PostCommitProcessing {
|
||||
*/
|
||||
void notifyLocalCache() {
|
||||
processTableEvents(event.getEventTables());
|
||||
if (manager.localL2Caching) {
|
||||
if (manager.notifyL2CacheInForeground) {
|
||||
// process l2 cache changes in foreground
|
||||
processCacheChanges(event.buildCacheChanges(manager.viewInvalidation));
|
||||
} else {
|
||||
|
||||
@@ -120,7 +120,7 @@ public class TransactionManager implements SpiTransactionManager {
|
||||
*/
|
||||
private final boolean changeLogAsync;
|
||||
|
||||
protected final boolean localL2Caching;
|
||||
protected final boolean notifyL2CacheInForeground;
|
||||
|
||||
protected final boolean viewInvalidation;
|
||||
|
||||
@@ -144,7 +144,7 @@ public class TransactionManager implements SpiTransactionManager {
|
||||
|
||||
this.databasePlatform = options.config.getDatabasePlatform();
|
||||
this.skipCacheAfterWrite = options.config.isSkipCacheAfterWrite();
|
||||
this.localL2Caching = options.localL2Caching;
|
||||
this.notifyL2CacheInForeground = options.notifyL2CacheInForeground;
|
||||
this.persistBatch = options.config.getPersistBatch();
|
||||
this.persistBatchOnCascade = options.config.appliedPersistBatchOnCascade();
|
||||
this.rollbackOnChecked = options.config.isTransactionRollbackOnChecked();
|
||||
|
||||
@@ -12,7 +12,7 @@ import io.ebeanservice.docstore.api.DocStoreUpdateProcessor;
|
||||
*/
|
||||
public class TransactionManagerOptions {
|
||||
|
||||
final boolean localL2Caching;
|
||||
final boolean notifyL2CacheInForeground;
|
||||
final ServerConfig config;
|
||||
final ClusterManager clusterManager;
|
||||
final BackgroundExecutor backgroundExecutor;
|
||||
@@ -23,11 +23,11 @@ public class TransactionManagerOptions {
|
||||
final SpiProfileHandler profileHandler;
|
||||
final TransactionScopeManager scopeManager;
|
||||
|
||||
public TransactionManagerOptions(boolean localL2Caching, ServerConfig config, TransactionScopeManager scopeManager, ClusterManager clusterManager,
|
||||
public TransactionManagerOptions(boolean notifyL2CacheInForeground, ServerConfig config, TransactionScopeManager scopeManager, ClusterManager clusterManager,
|
||||
BackgroundExecutor backgroundExecutor, DocStoreUpdateProcessor docStoreUpdateProcessor,
|
||||
BeanDescriptorManager descMgr, DataSourceSupplier dataSourceSupplier, SpiProfileHandler profileHandler) {
|
||||
|
||||
this.localL2Caching = localL2Caching;
|
||||
this.notifyL2CacheInForeground = notifyL2CacheInForeground;
|
||||
this.config = config;
|
||||
this.scopeManager = scopeManager;
|
||||
this.clusterManager = clusterManager;
|
||||
|
||||
Reference in new issue
Block a user