|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.esper.view.stat.olap.MultidimCubeImpl<V>
public final class MultidimCubeImpl<V>
Implementation for a multidimensional cube that can be configured with the type of cell to store. This cube implementation grows in each dimension as new dimension members are made known to the cube. If cells are added for dimension members that have not been encountered before, then the new dimension members are added to the known dimension members and the cube is redimensioned, ie. grows. In design of this class, performance is important in the following areas: - Access to cells should be very fast in the normal case. Normal case is that the cell for all dimension members (the particular coordinate) already exists. This class uses a map of dimension member set (coordinates) to fact array ordinal which gets great performance.
Constructor Summary | |
---|---|
MultidimCubeImpl(String[] dimensionNames,
MultidimCubeCellFactory<V> multidimCubeCellFactory)
Constructor. |
Method Summary | |
---|---|
V |
getCell(MultiKeyUntyped coordinates)
Get a cell, returns null if the cell does not yet exist. |
V |
getCellAddMembers(MultiKeyUntyped coordinates)
Get a cell adding the coordinate members if the cell does not yet exist. |
V[] |
getCells()
Returns all cells. |
String[] |
getDimensionNames()
Returns array containing name of each dimension including the name of the cell. |
List<Object> |
getMembers(int dimension)
Get the members making up a dimension. |
int |
getNumDimensions()
Get the number of dimensions of the cube. |
void |
setMembers(int dimension,
Class enumType)
Set dimension members from the enumeration Class. |
void |
setMembers(int dimension,
List<Object> members)
Set dimension members from the list of value objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultidimCubeImpl(String[] dimensionNames, MultidimCubeCellFactory<V> multidimCubeCellFactory)
dimensionNames
- is the name of each dimension - and dictates the number of dimensionsmultidimCubeCellFactory
- is the factory for cube cellsMethod Detail |
---|
public String[] getDimensionNames()
MultidimCube
getDimensionNames
in interface MultidimCube<V>
public final int getNumDimensions()
MultidimCube
getNumDimensions
in interface MultidimCube<V>
public final void setMembers(int dimension, Class enumType)
MultidimCube
setMembers
in interface MultidimCube<V>
dimension
- starts at 0 and has a max of number of dimensions minus 1enumType
- is the class for which the enum constants are obtained, and used as memberspublic final void setMembers(int dimension, List<Object> members)
MultidimCube
setMembers
in interface MultidimCube<V>
dimension
- starts at 0 and has a max of number of dimensions minus 1members
- is a list of objects making up the dimension member valuespublic final List<Object> getMembers(int dimension)
MultidimCube
getMembers
in interface MultidimCube<V>
dimension
- for which to return the members
public V getCell(MultiKeyUntyped coordinates)
MultidimCube
getCell
in interface MultidimCube<V>
coordinates
- contains member values for each dimension of the cube
public V getCellAddMembers(MultiKeyUntyped coordinates)
MultidimCube
getCellAddMembers
in interface MultidimCube<V>
coordinates
- contains member values for each dimension of the cube
public final V[] getCells()
MultidimCube
getCells
in interface MultidimCube<V>
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |