public abstract class

AbstractCacheStatistics

extends Object
implements CacheStatistics
java.lang.Object
   ↳ org.apache.archiva.redback.components.cache.AbstractCacheStatistics
Known Direct Subclasses

Summary

Public Constructors
AbstractCacheStatistics()
Public Methods
void clear()
Clear the statistics of the cache.
double getCacheHitRate()
Compute for the efficiency of this cache.
long getCacheHits()
Return the number of hits to content present in the cache.
long getCacheMiss()
Return the number of hits to keys that are not (yet) in the cache.
long getInMemorySize()
return the memory used by the cache in memory can be not implemented by some caches implementation
abstract long getSize()
Return the size (items number) of the current cache.
void hit()
void miss()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.archiva.redback.components.cache.CacheStatistics

Public Constructors

public AbstractCacheStatistics ()

Public Methods

public void clear ()

Clear the statistics of the cache.

public double getCacheHitRate ()

Compute for the efficiency of this cache.

Returns
  • the ratio of cache hits to the cache misses to queries for cache objects

public long getCacheHits ()

Return the number of hits to content present in the cache.

Returns
  • the number of hits to content present in the cache.

public long getCacheMiss ()

Return the number of hits to keys that are not (yet) in the cache.

Returns
  • the number of requests for content missing from the cache.

public long getInMemorySize ()

return the memory used by the cache in memory can be not implemented by some caches implementation

Returns
  • default implementation return 0

public abstract long getSize ()

Return the size (items number) of the current cache.

Returns
  • the size (items number) of the current cache.

public void hit ()

public void miss ()