Class CacheStats
java.lang.Object
org.opensearch.common.cache.stats.CacheStats
A mutable class containing the 5 live metrics tracked by a StatsHolder object.
-
Constructor Summary
ConstructorDescriptionCacheStats
(long hits, long misses, long evictions, long sizeInBytes, long items) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(CacheStats other) void
add
(ImmutableCacheStats snapshot) void
void
decrementSizeInBytes
(long amount) long
long
getHits()
long
getItems()
long
long
int
hashCode()
void
void
void
void
void
incrementSizeInBytes
(long amount) void
void
subtract
(ImmutableCacheStats other)
-
Constructor Details
-
CacheStats
public CacheStats(long hits, long misses, long evictions, long sizeInBytes, long items) -
CacheStats
public CacheStats()
-
-
Method Details
-
add
-
add
-
subtract
-
hashCode
public int hashCode() -
incrementHits
public void incrementHits() -
incrementMisses
public void incrementMisses() -
incrementEvictions
public void incrementEvictions() -
incrementSizeInBytes
public void incrementSizeInBytes(long amount) -
decrementSizeInBytes
public void decrementSizeInBytes(long amount) -
incrementItems
public void incrementItems() -
decrementItems
public void decrementItems() -
getHits
public long getHits() -
getMisses
public long getMisses() -
getEvictions
public long getEvictions() -
getSizeInBytes
public long getSizeInBytes() -
getItems
public long getItems() -
resetSizeAndEntries
public void resetSizeAndEntries() -
immutableSnapshot
-