private static void verifyCacheHasNoEviction(AdvancedCache<?, ?> cache) { if (cache.getCacheConfiguration().memory().isEvictionEnabled()) throw new IllegalArgumentException("DistributedSegmentReadLocker is not reliable when using a cache with eviction enabled, disable eviction on this cache instance"); }
private static void verifyCacheHasNoEviction(AdvancedCache<?, ?> cache) { if (cache.getCacheConfiguration().memory().isEvictionEnabled()) throw new IllegalArgumentException("DistributedSegmentReadLocker is not reliable when using a cache with eviction enabled, disable eviction on this cache instance"); }
private void prepareForTombstones(CacheMode cacheMode) { if (strategy != null) { assert strategy == Strategy.TOMBSTONES; return; } Configuration configuration = cache.getCacheConfiguration(); if (configuration.memory().isEvictionEnabled()) { log.evictionWithTombstones(); } prepareCommon(cacheMode); filter = Tombstone.EXCLUDE_TOMBSTONES; strategy = Strategy.TOMBSTONES; }
private static void validateMetadataCache(Cache<?, ?> cache, String indexName) { Configuration configuration = cache.getCacheConfiguration(); if (configuration.memory().isEvictionEnabled()) { throw log.evictionNotAllowedInMetadataCache(indexName, cache.getName()); } if (configuration.persistence().usingStores() && !configuration.persistence().preload()) { throw log.preloadNeededIfPersistenceIsEnabledForMetadataCache(indexName, cache.getName()); } }
private static void validateMetadataCache(Cache<?, ?> cache, String indexName) { Configuration configuration = cache.getCacheConfiguration(); if (configuration.memory().isEvictionEnabled()) { throw log.evictionNotAllowedInMetadataCache(indexName, cache.getName()); } if (configuration.persistence().usingStores() && !configuration.persistence().preload()) { throw log.preloadNeededIfPersistenceIsEnabledForMetadataCache(indexName, cache.getName()); } }
protected void doPreloadingTestWithEviction(Configuration preloadingCfg, String cacheName) throws Exception { assertTrue("Preload not enabled for preload with eviction test", preloadingCfg.persistence().preload()); assertTrue("Eviction not enabled for preload with eviction test", preloadingCfg.memory().isEvictionEnabled());