You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Accumulates statistics during the operation of a {@link Cache} for presentation by
* {@link Cache#stats}. This is solely intended for consumption by {@code Cache} implementors.
I suppose the last sentence is slightly ambiguous, but to me, it means StatsCounter shouldn't be implemented or used by caffeine reverse dependencies. However, a supplier for StatsCounter may be passed to Caffeine.recordStats since 2a8c688, which means it is a public interface.
The text was updated successfully, but these errors were encountered:
I suppose that could be reworded. It originates from Guava where it’s nested as an implementation detail. There a custom one wasn’t provided as Google scrapes stats by polling instead of pushing.
In this case it means it’s not a general purpose utility or meant for extension of additional statistics that an application might want. Those can be added externally to the cache, like a putCount. The native stats are the minimal common ones or those that are otherwise not obtainable, rather than an event callback hook for every permutation of an activity. Thus consumption is who’s utilizing it, rather than implementing the interface to give to the cache.
StatsCounter
has this javadoc:caffeine/caffeine/src/main/java/com/github/benmanes/caffeine/cache/stats/StatsCounter.java
Lines 26 to 27 in eafcb4a
I suppose the last sentence is slightly ambiguous, but to me, it means
StatsCounter
shouldn't be implemented or used by caffeine reverse dependencies. However, a supplier forStatsCounter
may be passed toCaffeine.recordStats
since 2a8c688, which means it is a public interface.The text was updated successfully, but these errors were encountered: