Class SmartRestrictedMemberReader

  • All Implemented Interfaces:
    MemberReader, MemberSource

    class SmartRestrictedMemberReader
    extends RestrictedMemberReader
    A SmartRestrictedMemberReader is a subclass of RestrictedMemberReader which caches the access rights per children's list. We place them in this throw-away object to speed up partial rollup calculations.

    The speed improvement is noticeable when dealing with very big dimensions with a lot of branches (like a parent-child hierarchy) because the 'partial' rollup policy forces us to navigate the tree and find the lowest level to rollup to and then figure out all of the children on which to constraint the SQL query.

    • Field Detail

      • memberToChildren

        final java.util.Map<RolapMember,​mondrian.rolap.SmartRestrictedMemberReader.AccessAwareMemberList> memberToChildren
      • lock

        final java.util.concurrent.locks.ReadWriteLock lock
    • Constructor Detail

      • SmartRestrictedMemberReader

        SmartRestrictedMemberReader​(MemberReader memberReader,
                                    Role role)
    • Method Detail

      • getMemberChildren

        public java.util.Map<? extends Member,​Access> getMemberChildren​(RolapMember member,
                                                                              java.util.List<RolapMember> children,
                                                                              MemberChildrenConstraint constraint)
        Description copied from interface: MemberReader
        Populates a list of the children of a Member, optionally applying a constraint.
        Specified by:
        getMemberChildren in interface MemberReader
        Overrides:
        getMemberChildren in class RestrictedMemberReader
        Parameters:
        member - Members whose children to find
        children - List to populate with members
        constraint - Constraint
        Returns:
        After populating the list passed as an argument, this method returns a map of the members it just populated along with the Access information applicable. If no access control applies to the member, the map will contain null values.