Top Description Fields Constructors Methods
com.github.benmanes.caffeine.cache.stats

pack-priv final Enum DisabledStatsCounter

extends Enum<DisabledStatsCounter>
implements StatsCounter
Class Inheritance
All Implemented Interfaces
com.github.benmanes.caffeine.cache.stats.StatsCounter
Static Imports
java.util.Objects.requireNonNull

A StatsCounter implementation that does not record any cache events.
Author
[email protected] (Ben Manes)

Field Summary

Modifier and TypeField and Description
public static final DisabledStatsCounter

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public void
recordHits(int count)

public void
recordLoadFailure(long loadTime)

public void
recordLoadSuccess(long loadTime)

public void
recordMisses(int count)

public CacheStats
snapshot()

Implements com.github.benmanes.caffeine.cache.stats.StatsCounter.snapshot.

Returns a snapshot of this counter's values.
public String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.
public static DisabledStatsCounter
public static DisabledStatsCounter[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

INSTANCEback to summary
public static final DisabledStatsCounter INSTANCE

Constructor Detail

DisabledStatsCounterback to summary
private DisabledStatsCounter()

Method Detail

recordEvictionback to summary
public void recordEviction(@NonNegative int weight, RemovalCause cause)
Annotations
@Override
recordHitsback to summary
public void recordHits(int count)
Annotations
@Override
recordLoadFailureback to summary
public void recordLoadFailure(long loadTime)
Annotations
@Override
recordLoadSuccessback to summary
public void recordLoadSuccess(long loadTime)
Annotations
@Override
recordMissesback to summary
public void recordMisses(int count)
Annotations
@Override
snapshotback to summary
public CacheStats snapshot()

Implements com.github.benmanes.caffeine.cache.stats.StatsCounter.snapshot.

Doc from com.github.benmanes.caffeine.cache.stats.StatsCounter.snapshot.

Returns a snapshot of this counter's values. Note that this may be an inconsistent view, as it may be interleaved with update operations.

Note

the values of the metrics are undefined in case of overflow (though it is guaranteed not to throw an exception). If you require specific handling, we recommend implementing your own stats collector.

Returns:CacheStats

a snapshot of this counter's values

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static DisabledStatsCounter valueOf(String name)
valuesback to summary
public static DisabledStatsCounter[] values()