PDA

View Full Version : [Mondrian] Usage of PinSet class



Thiyagu Palanisamy
05-07-2007, 11:10 AM
Hello,

PinSetImpl stores reference to all the Segments which are used in a
query, but stored references are used only at

Aggregation: line no 655.

// avoid to call wouldContain - its slow
if (pinSet != null
&& !((AggregationManager.PinSetImpl)
pinSet).contains(segment)
&& segment.wouldContain(keys))
{
((AggregationManager.PinSetImpl) pinSet).add(segment);
}

And this too is to add it to the list.

Can you please let me know if I'm missing any other usage of PinSet?

Thanks,
Thiyagu



_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Julian Hyde
05-07-2007, 03:31 PM
That probably is the only usage - but it is sufficient. Segments are
normally held using weak/soft references (I forget which) but a hard
reference in the pin set is sufficient to prevent it from being
garbage-collected for the duration of the query.

Julian


_____

From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org]
On Behalf Of Thiyagu Palanisamy
Sent: Monday, May 07, 2007 7:46 AM
To: mondrian (AT) pentaho (DOT) org
Subject: [Mondrian] Usage of PinSet class



Hello,

PinSetImpl stores reference to all the Segments which are used in a
query, but stored references are used only at

Aggregation: line no 655.

// avoid to call wouldContain - its slow
if (pinSet != null
&& !((AggregationManager.PinSetImpl)
pinSet).contains(segment)
&& segment.wouldContain(keys))
{
((AggregationManager.PinSetImpl)
pinSet).add(segment);
}

And this too is to add it to the list.

Can you please let me know if I'm missing any other usage of PinSet?

Thanks,
Thiyagu





_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian