@Override public Result cacheGetOperation() { return extended.allGet(); }
@Override public Result cacheMissOperation() { return extended.allMiss(); }
@Override public Result cachePutOperation() { return extended.allPut(); }
findStandardPassThruStatistics(); findStandardOperationStatistics(); this.allCacheGet = get().compound(ALL_CACHE_GET_OUTCOMES); this.allCacheMiss = get().compound(ALL_CACHE_MISS_OUTCOMES); this.allCachePut = put().compound(ALL_CACHE_PUT_OUTCOMES); this.allHeapPut = heapPut().compound(ALL_STORE_PUT_OUTCOMES); this.allOffHeapPut = offheapPut().compound(ALL_STORE_PUT_OUTCOMES); this.allDiskPut = diskPut().compound(ALL_STORE_PUT_OUTCOMES); this.cacheHitRatio = get().ratioOf(EnumSet.of(CacheOperationOutcomes.GetOutcome.HIT), EnumSet.allOf(CacheOperationOutcomes.GetOutcome.class)); this.nonStopTimeoutRatio = nonstop().ratioOf( EnumSet.of(CacheOperationOutcomes.NonStopOperationOutcomes.REJOIN_TIMEOUT, CacheOperationOutcomes.NonStopOperationOutcomes.TIMEOUT),
@Override public Result localDiskPutAddedOperation() { return extended.diskPut().component(PutOutcome.ADDED); }
@Override public Result localDiskHitOperation() { return extended.diskGet().component(GetOutcome.HIT); }
@Override public Result localDiskPutOperation() { return extended.diskAllPut(); }
@Override public Result cacheEvictionOperation() { return extended.eviction().component(EvictionOutcome.SUCCESS); }
@Override public Result localDiskRemoveOperation() { return extended.diskRemove().component(RemoveOutcome.SUCCESS); }
@Override public double cacheHitRatio() { return extended.cacheHitRatio().value().doubleValue(); }
/** * 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); }
findStandardPassThruStatistics(); findStandardOperationStatistics(); this.allCacheGet = get().compound(ALL_CACHE_GET_OUTCOMES); this.allCacheMiss = get().compound(ALL_CACHE_MISS_OUTCOMES); this.allCachePut = put().compound(ALL_CACHE_PUT_OUTCOMES); this.allHeapPut = heapPut().compound(ALL_STORE_PUT_OUTCOMES); this.allOffHeapPut = offheapPut().compound(ALL_STORE_PUT_OUTCOMES); this.allDiskPut = diskPut().compound(ALL_STORE_PUT_OUTCOMES); this.cacheHitRatio = get().ratioOf(EnumSet.of(CacheOperationOutcomes.GetOutcome.HIT), EnumSet.allOf(CacheOperationOutcomes.GetOutcome.class)); this.nonStopTimeoutRatio = nonstop().ratioOf( EnumSet.of(CacheOperationOutcomes.NonStopOperationOutcomes.REJOIN_TIMEOUT, CacheOperationOutcomes.NonStopOperationOutcomes.TIMEOUT),
@Override public Result localDiskPutReplacedOperation() { return extended.diskPut().component(PutOutcome.UPDATED); }
@Override public Result localDiskMissOperation() { return extended.diskGet().component(GetOutcome.MISS); }
@Override public Result localDiskPutOperation() { return extended.diskAllPut(); }
@Override public Result cacheEvictionOperation() { return extended.eviction().component(EvictionOutcome.SUCCESS); }
@Override public Result localDiskRemoveOperation() { return extended.diskRemove().component(RemoveOutcome.SUCCESS); }
@Override public double cacheHitRatio() { return extended.cacheHitRatio().value().doubleValue(); }
/** * 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); }
findStandardPassThruStatistics(); findStandardOperationStatistics(); this.allCacheGet = get().compound(ALL_CACHE_GET_OUTCOMES); this.allCacheMiss = get().compound(ALL_CACHE_MISS_OUTCOMES); this.allCachePut = put().compound(ALL_CACHE_PUT_OUTCOMES); this.allHeapPut = heapPut().compound(ALL_STORE_PUT_OUTCOMES); this.allOffHeapPut = offheapPut().compound(ALL_STORE_PUT_OUTCOMES); this.allDiskPut = diskPut().compound(ALL_STORE_PUT_OUTCOMES); this.cacheHitRatio = get().ratioOf(EnumSet.of(CacheOperationOutcomes.GetOutcome.HIT), EnumSet.allOf(CacheOperationOutcomes.GetOutcome.class)); this.nonStopTimeoutRatio = nonstop().ratioOf( EnumSet.of(CacheOperationOutcomes.NonStopOperationOutcomes.REJOIN_TIMEOUT, CacheOperationOutcomes.NonStopOperationOutcomes.TIMEOUT),