mondrian.rolap.agg
Class CountingAggregationManager

java.lang.Object
  extended by mondrian.rolap.RolapAggregationManager
      extended by mondrian.rolap.agg.AggregationManager
          extended by mondrian.rolap.agg.CountingAggregationManager

public class CountingAggregationManager
extends AggregationManager

This class adds to AggregationManager counters for aggregation cache hit and miss. It should only be used for testing purpose due to potential performance regression by the introduction of synchronized blocks.

Author:
Khanh Vu
 

Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.rolap.agg.AggregationManager
AggregationManager.PinSetImpl
 
Nested classes/interfaces inherited from class mondrian.rolap.RolapAggregationManager
RolapAggregationManager.PinSet
 
Constructor Summary
CountingAggregationManager()
           
 
Method Summary
 Object getCellFromCache(CellRequest request)
          Calls super method and sets counters.
 Object getCellFromCache(CellRequest request, RolapAggregationManager.PinSet pinSet)
          Calls super method and sets counters.
 double getHitRatio()
          Returns the cache hit ratio.
 int getMissCount()
          Returns number of cache misses.
 int getRequestCount()
          Returns total number of cache requests.
 void resetCounters()
          Resets both counters to zero
 
Methods inherited from class mondrian.rolap.agg.AggregationManager
createPinSet, findAgg, generateSql, getDrillThroughSql, getLogger, instance, loadAggregation
 
Methods inherited from class mondrian.rolap.RolapAggregationManager
getCacheCellReader, getCacheControl, makeCacheRegion, makeDrillThroughRequest, makeRequest, makeRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CountingAggregationManager

CountingAggregationManager()
Method Detail

getCellFromCache

public Object getCellFromCache(CellRequest request)
Calls super method and sets counters.

Overrides:
getCellFromCache in class AggregationManager
Parameters:
request - Cell request
Returns:
Cell value, or null if cell is not in any aggregation in cache, or Util.nullValue if cell's value is null

getCellFromCache

public Object getCellFromCache(CellRequest request,
                               RolapAggregationManager.PinSet pinSet)
Calls super method and sets counters.

Overrides:
getCellFromCache in class AggregationManager

getRequestCount

public int getRequestCount()
Returns total number of cache requests.

Returns:
an integer represents value of request counter

getMissCount

public int getMissCount()
Returns number of cache misses.

Returns:
an integer represents value of cache miss counter

getHitRatio

public double getHitRatio()
Returns the cache hit ratio.

Returns:
a double value represent hit ratio

resetCounters

public void resetCounters()
Resets both counters to zero


SourceForge.net_Logo