mondrian.rolap
Class RolapAggregationManager

java.lang.Object
  extended by mondrian.rolap.RolapAggregationManager
Direct Known Subclasses:
AggregationManager

public abstract class RolapAggregationManager
extends Object

RolapAggregationManager manages all Aggregations in the system. It is a singleton class.

The bits of the implementation which depend upon dimensional concepts RolapMember, etc.) live in this class, and the other bits live in the derived class, AggregationManager.

Since:
30 August, 2001
Author:
jhyde
 

Nested Class Summary
static interface RolapAggregationManager.PinSet
          A set of segments which are pinned for a short duration as a result of a cache inquiry.
 
Constructor Summary
protected RolapAggregationManager()
           
 
Method Summary
abstract  RolapAggregationManager.PinSet createPinSet()
          Creates a RolapAggregationManager.PinSet.
 CellReader getCacheCellReader()
          Returns a CellReader which reads cells from cache.
 CacheControl getCacheControl(PrintWriter pw)
          Returns an API with which to explicitly manage the contents of the cache.
abstract  Object getCellFromCache(CellRequest request)
          Retrieves the value of a cell from the cache.
abstract  Object getCellFromCache(CellRequest request, RolapAggregationManager.PinSet pinSet)
           
abstract  String getDrillThroughSql(CellRequest request, boolean countOnly)
          Generates a SQL statement which will return the rows which contribute to this request.
static RolapCacheRegion makeCacheRegion(RolapStar star, CacheControl.CellRegion region)
           
static CellRequest makeDrillThroughRequest(Member[] members, boolean extendedContext, RolapCube cube)
          Creates a request for the fact-table rows underlying the cell identified by members.
static CellRequest makeRequest(Member[] members)
          Creates a request to evaluate the cell identified by members.
static CellRequest makeRequest(RolapEvaluator evaluator)
          Creates a request to evaluate the cell identified by the context specified in evaluator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RolapAggregationManager

protected RolapAggregationManager()
Method Detail

makeRequest

public static CellRequest makeRequest(Member[] members)
Creates a request to evaluate the cell identified by members.

If any of the members is the null member, returns null, since there is no cell. If the measure is calculated, returns null.

Parameters:
members - Set of members which constrain the cell
Returns:
Cell request, or null if the requst is unsatisfiable

makeDrillThroughRequest

public static CellRequest makeDrillThroughRequest(Member[] members,
                                                  boolean extendedContext,
                                                  RolapCube cube)
Creates a request for the fact-table rows underlying the cell identified by members.

If any of the members is the null member, returns null, since there is no cell. If the measure is calculated, returns null.

Parameters:
members - Set of members which constrain the cell
extendedContext - If true, add non-constraining columns to the query for levels below each current member. This additional context makes the drill-through queries easier for humans to understand.
cube - Cube
Returns:
Cell request, or null if the requst is unsatisfiable

makeRequest

public static CellRequest makeRequest(RolapEvaluator evaluator)
Creates a request to evaluate the cell identified by the context specified in evaluator.

If any of the members from the context is the null member, returns null, since there is no cell. If the measure is calculated, returns null.

Parameters:
evaluator - the cell specified by the evaluator context
Returns:
Cell request, or null if the requst is unsatisfiable

getCellFromCache

public abstract Object getCellFromCache(CellRequest request)
Retrieves the value of a cell from the cache.

Pre-condition:
request != null && !request.isUnsatisfiable()
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 abstract Object getCellFromCache(CellRequest request,
                                        RolapAggregationManager.PinSet pinSet)

getDrillThroughSql

public abstract String getDrillThroughSql(CellRequest request,
                                          boolean countOnly)
Generates a SQL statement which will return the rows which contribute to this request.

Parameters:
request - Cell request
countOnly - If true, return a statment which returns only the count
Returns:
SQL statement

getCacheControl

public CacheControl getCacheControl(PrintWriter pw)
Returns an API with which to explicitly manage the contents of the cache.

Parameters:
pw - Print writer, for tracing
Returns:
CacheControl API

makeCacheRegion

public static RolapCacheRegion makeCacheRegion(RolapStar star,
                                               CacheControl.CellRegion region)

getCacheCellReader

public CellReader getCacheCellReader()
Returns a CellReader which reads cells from cache.


createPinSet

public abstract RolapAggregationManager.PinSet createPinSet()
Creates a RolapAggregationManager.PinSet.

Returns:
a new PinSet

SourceForge.net_Logo