private void initCapacityEvictionPolicyFromConfig(final TimestampedValue timestampedValue) { if (isCapacityEvictionEnabled()) { // use CapacityEvictionPolicyData.Factory in config to create a new one if its not an instance of the config's // factory CapacityEvictionPolicyData current = timestampedValue.getCapacityEvictionPolicyData(); if (!getConfig().getCapacityEvictionPolicyDataFactory().isProductOfFactory(current)) { CapacityEvictionPolicyData cep = getConfig().getCapacityEvictionPolicyDataFactory() .newCapacityEvictionPolicyData(); timestampedValue.setCapacityEvictionPolicyData(cep); } } }
private void initCapacityEvictionPolicyFromConfig(final TimestampedValue timestampedValue) { if (isCapacityEvictionEnabled()) { // use CapacityEvictionPolicyData.Factory in config to create a new one if its not an instance of the config's // factory CapacityEvictionPolicyData current = timestampedValue.getCapacityEvictionPolicyData(); if (!getConfig().getCapacityEvictionPolicyDataFactory().isProductOfFactory(current)) { CapacityEvictionPolicyData cep = getConfig().getCapacityEvictionPolicyDataFactory() .newCapacityEvictionPolicyData(); timestampedValue.setCapacityEvictionPolicyData(cep); } } }
private void initCapacityEvictionPolicyFromConfig(final TimestampedValue timestampedValue) { if (isCapacityEvictionEnabled()) { // use CapacityEvictionPolicyData.Factory in config to create a new one if its not an instance of the config's // factory CapacityEvictionPolicyData current = timestampedValue.getCapacityEvictionPolicyData(); if (!getConfig().getCapacityEvictionPolicyDataFactory().isProductOfFactory(current)) { CapacityEvictionPolicyData cep = getConfig().getCapacityEvictionPolicyDataFactory() .newCapacityEvictionPolicyData(); timestampedValue.setCapacityEvictionPolicyData(cep); } } }
public void evictOrphanElements(final ClusterInfo clusterInfo) { if (isEvictionEnabled() && getConfig().isOrphanEvictionEnabled()) { for (Map m : data.getConstituentMaps()) { Set<K> keys = clusterInfo.getKeysForOrphanedValues(m); invalidateCacheEntries(keys.iterator()); } } }
public void evictOrphanElements(final ClusterInfo clusterInfo) { if (isEvictionEnabled() && getConfig().isOrphanEvictionEnabled()) { for (Map m : data.getConstituentMaps()) { Set<K> keys = clusterInfo.getKeysForOrphanedValues(m); invalidateCacheEntries(keys.iterator()); } } }
public void evictOrphanElements(final ClusterInfo clusterInfo) { if (isEvictionEnabled() && getConfig().isOrphanEvictionEnabled()) { for (Map m : data.getConstituentMaps()) { Set<K> keys = clusterInfo.getKeysForOrphanedValues(m); invalidateCacheEntries(keys.iterator()); } } }
protected void initializeOnLoad(final boolean startEviction) { if (config.isLoggingEnabled()) { LOGGER.info("Initializing CHMDistributedMap, starting eviction thread"); } this.timeSource = new SystemTimeSource(); this.orphanEvictor = new OrphanEvictionListener<K>(config, this, orphanEvictorLock); this.evictionScheduler = new EvictionScheduler(config, new Evictor<K>(this, orphanEvictor)); this.statistics = new EvictionStatistics(); if (!this.config.isServerMap()) { // target capacity eviction listener not needed for servermap this.data.registerMapSizeListener(new TargetCapacityMapSizeListener(data, getConfig())); } if (startEviction) { startEviction(); } }
protected void initializeOnLoad(final boolean startEviction) { if (config.isLoggingEnabled()) { LOGGER.info("Initializing CHMDistributedMap, starting eviction thread"); } this.timeSource = new SystemTimeSource(); this.orphanEvictor = new OrphanEvictionListener<K>(config, this, orphanEvictorLock); this.evictionScheduler = new EvictionScheduler(config, new Evictor<K>(this, orphanEvictor)); this.statistics = new EvictionStatistics(); if (this.data instanceof CacheEvictionListenerSupport) { ((CacheEvictionListenerSupport) this.data).addCacheEvictionListener(this); } if (!this.config.isServerMap()) { // target capacity eviction listener not needed for servermap this.data.registerMapSizeListener(new TargetCapacityMapSizeListener(data, getConfig(), this)); } if (startEviction) { startEviction(); } }
protected void initializeOnLoad(final boolean startEviction) { if (config.isLoggingEnabled()) { LOGGER.info("Initializing CHMDistributedMap, starting eviction thread"); } this.timeSource = new SystemTimeSource(); this.orphanEvictor = new OrphanEvictionListener<K>(config, this, orphanEvictorLock); this.evictionScheduler = new EvictionScheduler(config, new Evictor<K>(this, orphanEvictor)); this.statistics = new EvictionStatistics(); if (this.data instanceof CacheEvictionListenerSupport) { ((CacheEvictionListenerSupport) this.data).addCacheEvictionListener(this); } if (!this.config.isServerMap()) { // target capacity eviction listener not needed for servermap this.data.registerMapSizeListener(new TargetCapacityMapSizeListener(data, getConfig(), this)); } if (startEviction) { startEviction(); } }