@Test public void testMSecsPerLoadFormatting() { double v = 2.3456789; assertEquals("2.346", CacheBaseInfo.formatMillisPerLoad(v)); v = 0.04; assertEquals("0.04", CacheBaseInfo.formatMillisPerLoad(v)); }
static String formatMillisPerLoad(double val) { if (val < 0) { return "-"; } DecimalFormat f = new DecimalFormat("#.###"); return f.format(val); }
CacheBaseInfo implements InternalCacheInfo { static String formatMillisPerLoad(double val) { if (val < 0) { return "-"; } DecimalFormat f = new DecimalFormat("#.###"); return f.format(val); } }
CacheBaseInfo implements InternalCacheInfo { static String formatMillisPerLoad(double val) { if (val < 0) { return "-"; } DecimalFormat f = new DecimalFormat("#.###"); return f.format(val); } CacheBaseInfo(HeapCache heapCache, InternalCache userCache, long now); }
CacheBaseInfo implements InternalCacheInfo { static String formatMillisPerLoad(double val) { if (val < 0) { return "-"; } DecimalFormat f = new DecimalFormat("#.###"); return f.format(val); } CacheBaseInfo(HeapCache heapCache, InternalCache userCache, long now); void setInfoCreationDeltaMs(int millis); @Override String getName(); @Override String getImplementation(); @Override long getExplicitLoadCount(); @Override long getSize(); @Override long getHeapCapacity(); @Override long getMaximumWeight(); @Override long getTotalWeight(); @Override long getEvictedWeight(); @Override long getGetCount(); @Override long getMissCount(); @Override long getNewEntryCount(); @Override long getHeapHitCount(); @Override long getLoadCount(); @Override long getRefreshCount(); @Override long getInternalExceptionCount(); @Override long getRefreshRejectedCount(); @Override long getSuppressedExceptionCount(); @Override long getLoadExceptionCount(); @Override long getRefreshedHitCount(); @Override long getExpiredCount(); @Override long getEvictedCount(); @Override int getEvictionRunningCount(); @Override long getRemoveCount(); @Override long getPutCount(); @Override long getGoneSpinCount(); @Override long getKeyMutationCount(); @Override long getTimerEventCount(); @Override double getHitRate(); @Override String getHitRateString(); @Override double getMillisPerLoad(); @Override long getLoadMillis(); @Override String getIntegrityDescriptor(); @Override long getStartedTime(); @Override long getClearedTime(); @Override long getInfoCreatedTime(); @Override int getInfoCreationDeltaMs(); @Override Collection<HealthInfoElement> getHealth(); @Override long getAsyncLoadsStarted(); @Override long getAsyncLoadsInFlight(); @Override int getLoaderThreadsLimit(); @Override int getLoaderThreadsMaxActive(); @Override String getExtraStatistics(); @Override long getClearCount(); long getClearedEntriesCount(); String toString(); }
CacheBaseInfo implements InternalCacheInfo { static String formatMillisPerLoad(double val) { if (val < 0) { return "-"; } DecimalFormat f = new DecimalFormat("#.###"); return f.format(val); } CacheBaseInfo(HeapCache heapCache, InternalCache userCache, long now); void setInfoCreationDeltaMs(int millis); @Override String getName(); @Override String getImplementation(); @Override long getExplicitLoadCount(); @Override long getSize(); @Override long getHeapCapacity(); @Override long getMaximumWeight(); @Override long getTotalWeight(); @Override long getEvictedWeight(); @Override long getGetCount(); @Override long getMissCount(); @Override long getNewEntryCount(); @Override long getHeapHitCount(); @Override long getLoadCount(); @Override long getRefreshCount(); @Override long getInternalExceptionCount(); @Override long getRefreshRejectedCount(); @Override long getSuppressedExceptionCount(); @Override long getLoadExceptionCount(); @Override long getRefreshedHitCount(); @Override long getExpiredCount(); @Override long getEvictedCount(); @Override int getEvictionRunningCount(); @Override long getRemoveCount(); @Override long getPutCount(); @Override long getGoneSpinCount(); @Override long getKeyMutationCount(); @Override long getTimerEventCount(); @Override double getHitRate(); @Override String getHitRateString(); @Override double getMillisPerLoad(); @Override long getLoadMillis(); @Override String getIntegrityDescriptor(); @Override long getStartedTime(); @Override long getClearedTime(); @Override long getInfoCreatedTime(); @Override int getInfoCreationDeltaMs(); @Override Collection<HealthInfoElement> getHealth(); @Override long getAsyncLoadsStarted(); @Override long getAsyncLoadsInFlight(); @Override int getLoaderThreadsLimit(); @Override int getLoaderThreadsMaxActive(); @Override String getExtraStatistics(); @Override long getClearCount(); long getClearedEntriesCount(); String toString();  }