@Override public long getNonStopFailureMostRecentSample() { return cache.getStatistics().getExtended().nonstop().component(NonStopOperationOutcomes.FAILURE).rate().value().longValue(); }
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 void set(String name, Long t) { op.setHistory(t.intValue(), op.getHistorySampleTime(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS); }
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),
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 synchronized void setAlwaysOn(boolean enabled) { if (enabled) { if (disableStatus != null) { disableStatus.cancel(false); disableStatus = null; } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(true); } } else { if (disableStatus == null) { disableStatus = executor.scheduleAtFixedRate(disableTask, 0, timeToDisable, timeToDisableUnit); } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(false); } } }
@Override public synchronized void setAlwaysOn(boolean enabled) { if (enabled) { if (disableStatus != null) { disableStatus.cancel(false); disableStatus = null; } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(true); } } else { if (disableStatus == null) { disableStatus = executor.scheduleAtFixedRate(disableTask, 0, timeToDisable, timeToDisableUnit); } for (Operation<?> o : standardOperations.values()) { o.setAlwaysOn(false); } } }
@Override public long value(T... results) { return compoundOp.compound(EnumSet.copyOf(Arrays.asList(results))).count().value(); }
@Override public void set(String name, Boolean t) { op.setAlwaysOn(t.booleanValue()); }
@Override public void set(String name, Long t) { op.setWindow(t.longValue(), TimeUnit.NANOSECONDS); }
@Override public Long get(String name) { return op.getWindowSize(TimeUnit.NANOSECONDS); }
@Override public Boolean get(String name) { return op.isAlwaysOn(); }
@Override public Long get(String name) { return (long) op.getHistorySampleSize(); }
@Override public void set(String name, Long t) { op.setWindow(t.longValue(), TimeUnit.NANOSECONDS); }
@Override public Long get(String name) { return op.getWindowSize(TimeUnit.NANOSECONDS); }
@Override public Boolean get(String name) { return op.isAlwaysOn(); }
@Override public Long get(String name) { return op.getHistorySampleTime(TimeUnit.NANOSECONDS); }
@Override public void set(String name, Long t) { op.setHistory(t.intValue(), op.getHistorySampleTime(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS); }
@Override public void set(String name, Long t) { op.setHistory(t.intValue(), op.getHistorySampleTime(TimeUnit.NANOSECONDS), TimeUnit.NANOSECONDS); }
@Override public Long get(String name) { return op.getHistorySampleTime(TimeUnit.NANOSECONDS); }