Package org.microproxy.cache
Record Class HttpCache.Stats
java.lang.Object
java.lang.Record
org.microproxy.cache.HttpCache.Stats
- Record Components:
hits- the number of requests answered from cached entries without revalidationmisses- the number of cache lookups without a usable entrystores- the number of responses storedrevalidations- the number of cached responses revalidatedstaleServed- the number of stale responses served
- Enclosing class:
HttpCache
public static record HttpCache.Stats(long hits, long misses, long stores, long revalidations, long staleServed)
extends Record
Counters since the cache was created.
-
Constructor Summary
ConstructorsConstructorDescriptionStats(long hits, long misses, long stores, long revalidations, long staleServed) Creates an instance of aStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longhits()Returns the value of thehitsrecord component.longmisses()Returns the value of themissesrecord component.longReturns the value of therevalidationsrecord component.longReturns the value of thestaleServedrecord component.longstores()Returns the value of thestoresrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Stats
public Stats(long hits, long misses, long stores, long revalidations, long staleServed) Creates an instance of aStatsrecord class.- Parameters:
hits- the value for thehitsrecord componentmisses- the value for themissesrecord componentstores- the value for thestoresrecord componentrevalidations- the value for therevalidationsrecord componentstaleServed- the value for thestaleServedrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
hits
public long hits()Returns the value of thehitsrecord component.- Returns:
- the value of the
hitsrecord component
-
misses
public long misses()Returns the value of themissesrecord component.- Returns:
- the value of the
missesrecord component
-
stores
public long stores()Returns the value of thestoresrecord component.- Returns:
- the value of the
storesrecord component
-
revalidations
public long revalidations()Returns the value of therevalidationsrecord component.- Returns:
- the value of the
revalidationsrecord component
-
staleServed
public long staleServed()Returns the value of thestaleServedrecord component.- Returns:
- the value of the
staleServedrecord component
-