@Override public Configuration getPendingPutsCacheConfiguration() { return delegate.getPendingPutsCacheConfiguration(); }
private void prepareForValidation() { if (strategy != null) { assert strategy == Strategy.VALIDATION; return; } // If two regions share the same name, they should use the same cache. // Using same cache means they should use the same put validator. // Besides, any cache interceptor initialization should only be done once. // Synchronizes on the cache instance since it's shared between regions with same name. synchronized (cache) { PutFromLoadValidator found = findValidator(cache); validator = found != null ? found : new PutFromLoadValidator(cache, factory, factory.getPendingPutsCacheConfiguration()); strategy = Strategy.VALIDATION; } }
/** * Base transactional region constructor * @param cache instance to store transactional data * @param name of the transactional region * @param transactionManager * @param metadata for the transactional region * @param factory for the transactional region * @param cacheKeysFactory factory for cache keys */ public BaseTransactionalDataRegion( AdvancedCache cache, String name, TransactionManager transactionManager, CacheDataDescription metadata, InfinispanRegionFactory factory, CacheKeysFactory cacheKeysFactory) { super( cache, name, transactionManager, factory); this.metadata = metadata; this.cacheKeysFactory = cacheKeysFactory; localCache = cache.withFlags(Flag.CACHE_MODE_LOCAL); Configuration configuration = cache.getCacheConfiguration(); requiresTransaction = configuration.transaction().transactionMode().isTransactional() && !configuration.transaction().autoCommit(); tombstoneExpiration = factory.getPendingPutsCacheConfiguration().expiration().maxIdle(); if (!isRegionAccessStrategyEnabled()) { strategy = Strategy.NONE; } expiringMetaParam = new MetaParam.MetaLifespan(tombstoneExpiration); }