public class RolapCubeHierarchy.CacheRolapCubeHierarchyMemberReader extends SmartMemberReader implements RolapCubeHierarchy.RolapCubeHierarchyMemberReader
Synchronization. Most synchronization takes place within SmartMemberReader. All synchronization is done on the cacheHelper object.
Modifier and Type | Field and Description |
---|---|
protected RolapCubeHierarchy.RolapCubeSqlMemberSource |
cubeSource
cubeSource is passed as our member builder
|
protected MemberCacheHelper |
rolapCubeCacheHelper
this cache caches RolapCubeMembers that are light wrappers around
shared and non-shared Hierarchy RolapMembers.
|
cacheHelper, rootMembers, source
Constructor and Description |
---|
CacheRolapCubeHierarchyMemberReader() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkCacheStatus() |
int |
compare(RolapMember m1,
RolapMember m2,
boolean siblingsAreEqual)
Compares two members according to their order in a prefix ordered
traversal.
|
RolapMember |
desubstitute(RolapMember member)
Returns the member which was substituted.
|
RolapMember |
getDefaultMember() |
RolapMember |
getLeadMember(RolapMember member,
int n)
Returns the member
n after member in the same
level (or before, if n is negative). |
int |
getLevelMemberCount(RolapLevel level)
Returns the number of members in this level.
|
TupleReader.MemberBuilder |
getMemberBuilder() |
RolapMember |
getMemberByKey(RolapLevel level,
List<Comparable> keyValues)
Looks up a member by its key value.
|
Map<? extends Member,Access> |
getMemberChildren(List<RolapMember> parentMembers,
List<RolapMember> children,
MemberChildrenConstraint constraint)
Populates a list of the children of a given set of Members, optionally
applying a constraint.
|
Map<? extends Member,Access> |
getMemberChildren(RolapMember member,
List<RolapMember> children,
MemberChildrenConstraint constraint)
Populates a list of the children of a Member, optionally applying a
constraint.
|
int |
getMemberCount()
Returns an estimate of number of members in this hierarchy.
|
RolapMember |
getMemberParent(RolapMember member) |
void |
getMemberRange(RolapLevel level,
RolapMember startMember,
RolapMember endMember,
List<RolapMember> list)
Writes all members between
startMember and
endMember into list . |
List<RolapMember> |
getMembersInLevel(RolapLevel level)
Returns all of the members in
level whose ordinal lies
between startOrdinal and endOrdinal . |
List<RolapMember> |
getMembersInLevel(RolapLevel level,
TupleConstraint constraint)
Returns the members in the given Level, optionally applying a constraint.
|
MemberCacheHelper |
getRolapCubeMemberCacheHelper() |
List<RolapMember> |
getRootMembers()
Returns all members of this hierarchy which do not have a parent,
sorted by ordinal.
|
RolapCubeMember |
lookupCubeMember(RolapCubeMember parent,
RolapMember member,
RolapCubeLevel level) |
protected void |
readMemberChildren(List<RolapMember> parentMembers,
List<RolapMember> children,
MemberChildrenConstraint constraint)
Reads the children of
member into cache, and also into
result . |
RolapMember |
substitute(RolapMember member)
Substitutes a given member.
|
compare, desubstitute, getDefaultMember, getHierarchy, getLeadMember, getLevelMemberCount, getMemberCache, getMemberChildren, getMemberChildren, getMemberChildren, getMemberParent, getMemberRange, getMembers, getMembersInLevel, isSorted, lookupMember, setCache, substitute
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHierarchy, getMemberChildren, getMemberChildren, getMembers, lookupMember, setCache
protected final RolapCubeHierarchy.RolapCubeSqlMemberSource cubeSource
protected MemberCacheHelper rolapCubeCacheHelper
public TupleReader.MemberBuilder getMemberBuilder()
getMemberBuilder
in class SmartMemberReader
public MemberCacheHelper getRolapCubeMemberCacheHelper()
getRolapCubeMemberCacheHelper
in interface RolapCubeHierarchy.RolapCubeHierarchyMemberReader
public List<RolapMember> getRootMembers()
MemberSource
If this object supports cache-writeback
, also
writes these members to the cache.
getRootMembers
in class SmartMemberReader
List
of RolapMember
sprotected void readMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint)
SmartMemberReader
member
into cache, and also into
result
.readMemberChildren
in class SmartMemberReader
parentMembers
- Members whose children to readchildren
- Children are written here, in orderconstraint
- restricts the returned members if possible (optional
optimization)public Map<? extends Member,Access> getMemberChildren(List<RolapMember> parentMembers, List<RolapMember> children, MemberChildrenConstraint constraint)
getMemberChildren
in class SmartMemberReader
parentMembers
- List of members whose children to findchildren
- List to populate with membersconstraint
- Constraintnull
values.public List<RolapMember> getMembersInLevel(RolapLevel level, TupleConstraint constraint)
getMembersInLevel
in class SmartMemberReader
level
- Levelconstraint
- Constraintpublic RolapMember getMemberByKey(RolapLevel level, List<Comparable> keyValues)
getMemberByKey
in class SmartMemberReader
level
- LevelkeyValues
- Key valuespublic RolapCubeMember lookupCubeMember(RolapCubeMember parent, RolapMember member, RolapCubeLevel level)
lookupCubeMember
in interface RolapCubeHierarchy.RolapCubeHierarchyMemberReader
public int getMemberCount()
MemberSource
getMemberCount
in class SmartMemberReader
protected void checkCacheStatus()
checkCacheStatus
in class SmartMemberReader
public RolapMember getLeadMember(RolapMember member, int n)
n
after member
in the same
level (or before, if n
is negative).
Returns Hierarchy.getNullMember()
if we run off the beginning or
end of the level.public List<RolapMember> getMembersInLevel(RolapLevel level)
level
whose ordinal lies
between startOrdinal
and endOrdinal
.
If this object
supports cache-writeback
, also
writes these members to the cache.
List
of RolapMember
public void getMemberRange(RolapLevel level, RolapMember startMember, RolapMember endMember, List<RolapMember> list)
startMember
and
endMember
into list
.public int compare(RolapMember m1, RolapMember m2, boolean siblingsAreEqual)
siblingsAreEqual
, then two members with the
same parent will compare equal.siblingsAreEqual
and
m1 and m2 have the same parentpublic Map<? extends Member,Access> getMemberChildren(RolapMember member, List<RolapMember> children, MemberChildrenConstraint constraint)
member
- Members whose children to findchildren
- List to populate with membersconstraint
- Constraintnull
values.public int getLevelMemberCount(RolapLevel level)
level
- Levelpublic RolapMember getDefaultMember()
public RolapMember getMemberParent(RolapMember member)
public RolapMember substitute(RolapMember member)
This method is called whenever a member is returned from the wrapped member reader and is to be returned to the caller. You could say that it translates 'to caller space'.
member
- Memberpublic RolapMember desubstitute(RolapMember member)
This method is called whenever the caller passes a member into a method and needs to be passed to a method on the wrapped member reader. You could say that it translates 'from caller space'.
member
- MemberCopyright © 2018 Hitachi Vantara. All rights reserved.