static class RolapResult.CellInfoPool extends Object implements RolapResult.CellInfoContainer
RolapResult.CellInfoContainer
which uses an
ObjectPool
to store RolapResult.CellInfo
Objects.
There is an inner interface (CellKeyMaker
) and
implementations for 0 through 4 axes that convert the Cell
position integer array into a long.
It should be noted that there is an alternate approach.
As the executeStripe
method is recursively called, at each call it is known which
axis is being iterated across and it is known whether or
not the Position object for that axis is a List or just
an Iterable. It it is a List, then one knows the real
size of the axis. If it is an Iterable, then one has to
use one of the MAX_AXIS_SIZE values. Given that this information
is available when one recursives down to the next
executeStripe
call, the Cell ordinal, the position
integer array could converted to an long
, could
be generated on the call stack!! Just a thought for the future.
Modifier and Type | Class and Description |
---|---|
(package private) static interface |
RolapResult.CellInfoPool.CellKeyMaker
Implementations of CellKeyMaker convert the Cell
position integer array to a
long . |
(package private) static class |
RolapResult.CellInfoPool.Four
For axis of size 4.
|
(package private) static class |
RolapResult.CellInfoPool.One
For axis of size 1.
|
(package private) static class |
RolapResult.CellInfoPool.Three
For axis of size 3.
|
(package private) static class |
RolapResult.CellInfoPool.Two
For axis of size 2.
|
(package private) static class |
RolapResult.CellInfoPool.Zero
For axis of size 0.
|
Modifier and Type | Field and Description |
---|---|
protected static long |
MAX_AXIS_SIZE_2
The maximum number of Members, 2,147,483,647, that can be any given
Axis when the number of Axes is 2.
|
protected static long |
MAX_AXIS_SIZE_3
The maximum number of Members, 2,000,000, that can be any given
Axis when the number of Axes is 3.
|
protected static long |
MAX_AXIS_SIZE_4
The maximum number of Members, 50,000, that can be any given
Axis when the number of Axes is 4.
|
Constructor and Description |
---|
RolapResult.CellInfoPool(int axisLength) |
RolapResult.CellInfoPool(int axisLength,
int initialSize) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all CellInfo objects from container.
|
RolapResult.CellInfo |
create(int[] pos)
Creates a new CellInfo object, adds it to the container
a location
pos and returns it. |
RolapResult.CellInfo |
lookup(int[] pos)
Gets the CellInfo object at the location
pos . |
int |
size()
Returns the number of CellInfo objects in this container.
|
void |
trimToSize()
Reduces the size of the internal data structures needed to
support the current entries.
|
protected static final long MAX_AXIS_SIZE_2
protected static final long MAX_AXIS_SIZE_3
protected static final long MAX_AXIS_SIZE_4
RolapResult.CellInfoPool(int axisLength)
RolapResult.CellInfoPool(int axisLength, int initialSize)
public int size()
RolapResult.CellInfoContainer
size
in interface RolapResult.CellInfoContainer
public void trimToSize()
RolapResult.CellInfoContainer
trimToSize
in interface RolapResult.CellInfoContainer
public void clear()
RolapResult.CellInfoContainer
clear
in interface RolapResult.CellInfoContainer
public RolapResult.CellInfo create(int[] pos)
RolapResult.CellInfoContainer
pos
and returns it.create
in interface RolapResult.CellInfoContainer
pos
- where to store CellInfo object.public RolapResult.CellInfo lookup(int[] pos)
RolapResult.CellInfoContainer
pos
.lookup
in interface RolapResult.CellInfoContainer
pos
- where to find the CellInfo object.