/** * Further initialize this object and launch the eviction thread. */ public void initializeOnLoad() { this.timeSource = new SystemTimeSource(); this.evictionScheduler = new EvictionScheduler(config, new Evictor<K>(this)); this.statistics = new EvictionStatistics(); this.data.registerMapSizeListener(new TargetCapacityMapSizeListener(data, getConfig())); }
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(); this.data.registerMapSizeListener(new TargetCapacityMapSizeListener(data, getConfig())); if (startEviction) { startEviction(); } }