Show / Hide Table of Contents

Class SimpleCacheStatistics

Implementation of the ICacheStatistics interface intended for use by a cache to maintain its statistics.

Inheritance
object
SimpleCacheStatistics
Implements
ICacheStatistics
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Tangosol.Net.Cache
Assembly: Coherence.dll
Syntax
public class SimpleCacheStatistics : ICacheStatistics

Fields

m_cacheHits

The rough (ie unsynchronized) number of calls that could be answered from the front or the back and were answered by data in the front cache.

Declaration
protected long m_cacheHits
Field Value
Type Description
long

m_cacheMisses

The rough (ie unsynchronized) number of calls that could be answered from the front or the back and were answered by data in the back map.

Declaration
protected long m_cacheMisses
Field Value
Type Description
long

m_cachePrunes

Total number of prune operations since the last statistics reset.

Declaration
protected long m_cachePrunes
Field Value
Type Description
long

m_cachePuts

Total number of put operations since the last statistics reset.

Declaration
protected long m_cachePuts
Field Value
Type Description
long

m_hitsMillis

Total number of milliseconds used for get operations that were hits since the last statistics reset.

Declaration
protected long m_hitsMillis
Field Value
Type Description
long

m_missesMillis

Total number of milliseconds used for get operations that were misses since the last statistics reset.

Declaration
protected long m_missesMillis
Field Value
Type Description
long

m_prunesMillis

Total number of milliseconds used for prune operations since the last statistics reset.

Declaration
protected long m_prunesMillis
Field Value
Type Description
long

m_putsMillis

Total number of milliseconds used for put operations since the last statistics reset.

Declaration
protected long m_putsMillis
Field Value
Type Description
long

Properties

AverageGetMillis

Determine the average number of milliseconds per "get" invocation since the cache statistics were last reset.

Declaration
public virtual double AverageGetMillis { get; }
Property Value
Type Description
double

The average number of milliseconds per "get" operation.

AverageHitMillis

Determine the average number of milliseconds per "get" invocation that is a hit.

Declaration
public virtual double AverageHitMillis { get; }
Property Value
Type Description
double

The average number of milliseconds per cache hit.

AverageMissMillis

Determine the average number of milliseconds per "get" invocation that is a miss.

Declaration
public virtual double AverageMissMillis { get; }
Property Value
Type Description
double

The average number of milliseconds per cache miss.

AveragePruneMillis

Determine the average number of milliseconds per cache pruning.

Declaration
public virtual double AveragePruneMillis { get; }
Property Value
Type Description
double

The average number of milliseconds per cache pruning.

AveragePutMillis

Determine the average number of milliseconds per "put" invocation since the cache statistics were last reset.

Declaration
public virtual double AveragePutMillis { get; }
Property Value
Type Description
double

The average number of milliseconds per "put" operation.

CacheHits

Determine the rough number of cache hits since the cache statistics were last reset.

Declaration
public virtual long CacheHits { get; }
Property Value
Type Description
long

The number of "get" calls that have been served by existing cache entries.

Remarks

A cache hit is a read operation invocation (i.e. "get") for which an entry exists in this cache.

CacheHitsMillis

Determine the total number of milliseconds (since the last statistics reset) for the "get" operations for which an entry existed in this cache.

Declaration
public virtual long CacheHitsMillis { get; }
Property Value
Type Description
long

The total number of milliseconds for the "get" operations that were hits.

CacheMisses

Determine the rough number of cache misses since the cache statistics were last reset.

Declaration
public virtual long CacheMisses { get; }
Property Value
Type Description
long

The number of "get" calls that failed to find an existing cache entry because the requested key was not in the cache.

Remarks

A cache miss is a "get" invocation that does not have an entry in this cache.

CacheMissesMillis

Determine the total number of milliseconds (since the last statistics reset) for the "get" operations for which no entry existed in this cache.

Declaration
public virtual long CacheMissesMillis { get; }
Property Value
Type Description
long

The total number of milliseconds (since the last statistics reset) for the "get" operations that were misses.

CachePrunes

Determine the rough number of cache pruning cycles since the cache statistics were last reset.

Declaration
public virtual long CachePrunes { get; }
Property Value
Type Description
long

The total number of cache pruning cycles (since that last statistics reset).

Remarks

For the LocalCache implementation, this refers to the number of times that the prune() method is executed.

CachePrunesMillis

Determine the total number of milliseconds (since that last statistics reset) spent on cache pruning.

Declaration
public virtual long CachePrunesMillis { get; }
Property Value
Type Description
long

The total number of milliseconds (since that last statistics reset) for cache pruning operations.

Remarks

For the LocalCache implementation, this refers to the time spent in the prune() method.

HitProbability

Determine the rough probability (0 <= p <= 1) that the next invocation will be a hit, based on the statistics collected since the last reset of the cache statistics.

Declaration
public virtual double HitProbability { get; }
Property Value
Type Description
double

The cache hit probability (0 <= p <= 1).

TotalGets

Determine the total number of "get" operations since the cache statistics were last reset.

Declaration
public virtual long TotalGets { get; }
Property Value
Type Description
long

The total number of "get" operations.

TotalGetsMillis

Determine the total number of milliseconds spent on "get" operations since the cache statistics were last reset.

Declaration
public virtual long TotalGetsMillis { get; }
Property Value
Type Description
long

The total number of milliseconds processing "get" operations.

TotalPuts

Determine the total number of "put" operations since the cache statistics were last reset.

Declaration
public virtual long TotalPuts { get; }
Property Value
Type Description
long

The total number of "put" operations.

TotalPutsMillis

Determine the total number of milliseconds spent on "put" operations since the cache statistics were last reset.

Declaration
public virtual long TotalPutsMillis { get; }
Property Value
Type Description
long

The total number of milliseconds processing "put" operations.

Methods

RegisterCachePrune(long)

Register a cache prune.

Declaration
public virtual void RegisterCachePrune(long startMillis)
Parameters
Type Name Description
long startMillis

The time when the prune operation started.

RegisterHit()

Register a cache hit (no timing information).

Declaration
public virtual void RegisterHit()

RegisterHit(long)

Register a cache hit.

Declaration
public virtual void RegisterHit(long startMillis)
Parameters
Type Name Description
long startMillis

The time when the get operation started.

RegisterHits(int, long)

Register a multiple cache hit.

Declaration
public virtual void RegisterHits(int hits, long startMillis)
Parameters
Type Name Description
int hits

The number of hits.

long startMillis

The time when the get operation started.

RegisterMiss()

Register a cache miss (no timing information).

Declaration
public virtual void RegisterMiss()

RegisterMiss(long)

Register a cache miss.

Declaration
public virtual void RegisterMiss(long startMillis)
Parameters
Type Name Description
long startMillis

The time when the get operation started.

RegisterMisses(int, long)

Register a multiple cache miss.

Declaration
public virtual void RegisterMisses(int misses, long startMillis)
Parameters
Type Name Description
int misses

The number of misses.

long startMillis

The time when the get operation started.

RegisterPut(long)

Register a cache put.

Declaration
public virtual void RegisterPut(long startMillis)
Parameters
Type Name Description
long startMillis

The time when the put operation started.

RegisterPuts(int, long)

Register a multiple cache put.

Declaration
public virtual void RegisterPuts(int puts, long startMillis)
Parameters
Type Name Description
int puts

The number of puts.

long startMillis

The time when the put operation started.

ResetHitStatistics()

Reset the cache statistics.

Declaration
public virtual void ResetHitStatistics()

ToString()

For debugging purposes, format the contents of the SimpleCachingStatistics in a human readable format.

Declaration
public override string ToString()
Returns
Type Description
string

A String representation of this object.

Overrides
object.ToString()

Implements

ICacheStatistics
In this article
Back to top Copyright © 2000, 2024, Oracle and/or its affiliates.