Package de.hybris.platform.regioncache
Class CacheStatistics
java.lang.Object
de.hybris.platform.regioncache.CacheStatistics
- All Implemented Interfaces:
CacheStatisticsEntry,Comparable<Object>
Class keeps statistics for single cache region. Statistics are available for each type code used.
Available statistics:
Available statistics:
- hits
- fetches
- misses
- evictions
- invalidations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all cache statistics.
Method is thread safe but this method is not performed atomically.intvoidincrements evict count for specified type codevoidincrements load/compute count for specified type codelongreturns eviction counter for all typeslonggetEvictions(Object typeCode) intintlongHow many db loads / computes performedlonggetFetches(Object typeCode) longlonggetHits()returns hit counter for all typeslonglonglonggetInstanceCount(Object typeCode) longreturns invalidation counter for all typeslonggetInvalidations(Object typeCode) longlongreturns miss counter for all typeslonggetTypes()returns all type codes used in this statistics holdervoidincrements hit count for specified type codevoidinvalidated(Object typeCode) increments invalidate count for specified type codevoidincrements miss count for specified type code
-
Constructor Details
-
CacheStatistics
public CacheStatistics()
-
-
Method Details
-
hit
increments hit count for specified type code -
fetched
increments load/compute count for specified type code -
missed
increments miss count for specified type code -
evicted
increments evict count for specified type code -
invalidated
increments invalidate count for specified type code -
getHits
public long getHits()returns hit counter for all types -
getHits
-
getFetches
public long getFetches()How many db loads / computes performed -
getFetches
-
getMisses
public long getMisses()returns miss counter for all types -
getMisses
-
getEvictions
public long getEvictions()returns eviction counter for all types -
getEvictions
-
getInvalidations
public long getInvalidations()returns invalidation counter for all types -
getInvalidations
-
getInstanceCount
public long getInstanceCount() -
getInstanceCount
-
getTypes
returns all type codes used in this statistics holder -
clear
public void clear()Clears all cache statistics.
Method is thread safe but this method is not performed atomically. -
getKeyString
- Specified by:
getKeyStringin interfaceCacheStatisticsEntry
-
getHitCount
public long getHitCount()- Specified by:
getHitCountin interfaceCacheStatisticsEntry
-
getMissCount
public long getMissCount()- Specified by:
getMissCountin interfaceCacheStatisticsEntry
-
getFactor
public int getFactor()- Specified by:
getFactorin interfaceCacheStatisticsEntry
-
getFactor
-
compareTo
- Specified by:
compareToin interfaceComparable<Object>
-