mondrian.rolap
Class SmartMemberListCache<K,V>

java.lang.Object
  extended by mondrian.rolap.SmartMemberListCache<K,V>

public class SmartMemberListCache<K,V>
extends Object

Uses a SmartCache to store lists of members, where the key depends on a SqlConstraint.

Example 1

   select ...
   [Customer].[Name].members on rows
   ...
 
Example 2
   select ...
   NON EMPTY [Customer].[Name].members on rows
   ...
   WHERE ([Store#14], [Product].[Product#1])
 
The first set, all customers are computed, in the second only those, who have bought Product#1 in Store#14. We want to put both results into the cache. Then the key for the cache entry is the Level that the members belong to plus the costraint that restricted the amount of members fetched. For Level.Members the key consists of the Level and the cacheKey of the SqlConstraint

Since:
Nov 21, 2005
Author:
av
See Also:
SqlConstraint.getCacheKey()
 

Nested Class Summary
(package private) static class SmartMemberListCache.Key2<T1,T2>
          a HashMap key that consists of two components.
 
Field Summary
(package private)  SmartCache<SmartMemberListCache.Key2<K,Object>,V> cache
           
 
Constructor Summary
SmartMemberListCache()
           
 
Method Summary
 void clear()
           
 V get(K key, SqlConstraint constraint)
           
(package private)  SmartCache<SmartMemberListCache.Key2<K,Object>,V> getCache()
           
 Object put(K key, SqlConstraint constraint, V value)
           
(package private)  void setCache(SmartCache<SmartMemberListCache.Key2<K,Object>,V> cache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

SmartCache<SmartMemberListCache.Key2<K,Object>,V> cache
Constructor Detail

SmartMemberListCache

public SmartMemberListCache()
Method Detail

put

public Object put(K key,
                  SqlConstraint constraint,
                  V value)

get

public V get(K key,
             SqlConstraint constraint)

clear

public void clear()

getCache

SmartCache<SmartMemberListCache.Key2<K,Object>,V> getCache()

setCache

void setCache(SmartCache<SmartMemberListCache.Key2<K,Object>,V> cache)

SourceForge.net_Logo