/** * Instantiates a new statistics placeholder. * * @param ehcache the ehcache * @param executor the executor */ public StatisticsGateway(Ehcache ehcache, ScheduledExecutorService executor) { StatisticsManager statsManager = new StatisticsManager(); statsManager.root(ehcache); this.assocCacheName = ehcache.getName(); ManagementRESTServiceConfiguration mRest = null; if (ehcache != null && ehcache.getCacheManager() != null && ehcache.getCacheManager().getConfiguration() != null) { mRest = ehcache.getCacheManager().getConfiguration().getManagementRESTService(); } this.extended = new ExtendedStatisticsImpl(statsManager, executor, DEFAULT_TIME_TO_DISABLE_MINS, TimeUnit.MINUTES, getProperSampleHistorySize(mRest), getProperSampleIntervalSeconds(mRest), getProperSampleSearchIntervalSeconds(mRest)); this.core = new CoreStatisticsImpl(extended); }
/** * Instantiates a new statistics placeholder. * * @param ehcache the ehcache * @param executor the executor */ public StatisticsGateway(Ehcache ehcache, ScheduledExecutorService executor) { StatisticsManager statsManager = new StatisticsManager(); statsManager.root(ehcache); this.assocCacheName = ehcache.getName(); ManagementRESTServiceConfiguration mRest = null; if (ehcache != null && ehcache.getCacheManager() != null && ehcache.getCacheManager().getConfiguration() != null) { mRest = ehcache.getCacheManager().getConfiguration().getManagementRESTService(); } this.extended = new ExtendedStatisticsImpl(statsManager, executor, DEFAULT_TIME_TO_DISABLE_MINS, TimeUnit.MINUTES, getProperSampleHistorySize(mRest), getProperSampleIntervalSeconds(mRest), getProperSampleSearchIntervalSeconds(mRest)); this.core = new CoreStatisticsImpl(extended); }
/** * Instantiates a new statistics placeholder. * * @param ehcache the ehcache * @param executor the executor */ public StatisticsGateway(Ehcache ehcache, ScheduledExecutorService executor) { StatisticsManager statsManager = new StatisticsManager(); statsManager.root(ehcache); this.assocCacheName = ehcache.getName(); ManagementRESTServiceConfiguration mRest = null; if (ehcache != null && ehcache.getCacheManager() != null && ehcache.getCacheManager().getConfiguration() != null) { mRest = ehcache.getCacheManager().getConfiguration().getManagementRESTService(); } this.extended = new ExtendedStatisticsImpl(statsManager, executor, DEFAULT_TIME_TO_DISABLE_MINS, TimeUnit.MINUTES, getProperSampleHistorySize(mRest), getProperSampleIntervalSeconds(mRest), getProperSampleSearchIntervalSeconds(mRest)); this.core = new CoreStatisticsImpl(extended); }