com.hazelcast.monitor.impl
Class LocalCacheStatsImpl
java.lang.Object
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
LocalCacheStatsImpl
public LocalCacheStatsImpl()
LocalCacheStatsImpl
public LocalCacheStatsImpl(CacheStatistics cacheStatistics)
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.