com.hazelcast.monitor.impl
Class LocalCacheStatsImpl

java.lang.Object
  extended by com.hazelcast.monitor.impl.LocalCacheStatsImpl
All Implemented Interfaces:
JsonSerializable, LocalCacheStats, LocalInstanceStats

public class LocalCacheStatsImpl
extends Object
implements LocalCacheStats

Default implementation of LocalCacheStats This class just provides serialization/deserialization methods to be used in MemberState implementation while sending/receiving statistics to/from Management center. There are no calculations are done in this class, all statistics gathered from CacheStatistics No setter methods are provided, all class fields supposed to be populated either by a CacheStatistics or while deserialization process (fromJson(com.eclipsesource.json.JsonObject).

See Also:
CacheStatistics

Field Summary
 
Fields inherited from interface com.hazelcast.monitor.LocalInstanceStats
STAT_NOT_AVAILABLE
 
Constructor Summary
LocalCacheStatsImpl()
           
LocalCacheStatsImpl(CacheStatistics cacheStatistics)
           
 
Method Summary
 void fromJson(com.eclipsesource.json.JsonObject json)
           
 float getAverageGetTime()
          The mean time to execute gets
 float getAveragePutTime()
          The mean time to execute puts
 float getAverageRemoveTime()
          The mean time to execute removes
 long getCacheEvictions()
           
 long getCacheGets()
           
 float getCacheHitPercentage()
           
 long getCacheHits()
           
 long getCacheMisses()
           
 float getCacheMissPercentage()
           
 long getCachePuts()
           
 long getCacheRemovals()
           
 long getCreationTime()
           
 com.eclipsesource.json.JsonObject toJson()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalCacheStatsImpl

public LocalCacheStatsImpl()

LocalCacheStatsImpl

public LocalCacheStatsImpl(CacheStatistics cacheStatistics)
Method Detail

getCacheHits

public long getCacheHits()
Specified by:
getCacheHits in interface LocalCacheStats
Returns:
the number of hits

getCacheHitPercentage

public float getCacheHitPercentage()
Specified by:
getCacheHitPercentage in interface LocalCacheStats
Returns:
the percentage of hits (successful get operations)

getCacheMisses

public long getCacheMisses()
Specified by:
getCacheMisses in interface LocalCacheStats
Returns:
the number misses

getCacheMissPercentage

public float getCacheMissPercentage()
Specified by:
getCacheMissPercentage in interface LocalCacheStats
Returns:
the percentage of missed cache accesses

getCacheGets

public long getCacheGets()
Specified by:
getCacheGets in interface LocalCacheStats
Returns:
the number of gets

getCachePuts

public long getCachePuts()
Specified by:
getCachePuts in interface LocalCacheStats
Returns:
the number of puts

getCacheRemovals

public long getCacheRemovals()
Specified by:
getCacheRemovals in interface LocalCacheStats
Returns:
the number of removals

getCacheEvictions

public long getCacheEvictions()
Specified by:
getCacheEvictions in interface LocalCacheStats
Returns:
the number of evictions

getAverageGetTime

public float getAverageGetTime()
Description copied from interface: LocalCacheStats
The mean time to execute gets

Specified by:
getAverageGetTime in interface LocalCacheStats
Returns:
the time in µs

getAveragePutTime

public float getAveragePutTime()
Description copied from interface: LocalCacheStats
The mean time to execute puts

Specified by:
getAveragePutTime in interface LocalCacheStats
Returns:
the time in µs

getAverageRemoveTime

public float getAverageRemoveTime()
Description copied from interface: LocalCacheStats
The mean time to execute removes

Specified by:
getAverageRemoveTime in interface LocalCacheStats
Returns:
the time in µs

getCreationTime

public long getCreationTime()
Specified by:
getCreationTime in interface LocalInstanceStats

toJson

public com.eclipsesource.json.JsonObject toJson()
Specified by:
toJson in interface JsonSerializable

fromJson

public void fromJson(com.eclipsesource.json.JsonObject json)
Specified by:
fromJson in interface JsonSerializable

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.