mondrian.rolap.cache
Class HardSmartCache<K,V>

java.lang.Object
  extended by mondrian.rolap.cache.HardSmartCache<K,V>
All Implemented Interfaces:
Iterable<Map.Entry<K,V>>, SmartCache<K,V>

public class HardSmartCache<K,V>
extends Object
implements SmartCache<K,V>

An implementation of SmartCache that uses hard references. Used for testing.

 

Field Summary
(package private)  Map<K,V> cache
           
 
Constructor Summary
HardSmartCache()
           
 
Method Summary
 void clear()
           
 V get(K key)
           
 Iterator<Map.Entry<K,V>> iterator()
           
 V put(K key, V value)
          Places a key/value pair into the queue.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

Map<K,V> cache
Constructor Detail

HardSmartCache

public HardSmartCache()
Method Detail

put

public V put(K key,
             V value)
Description copied from interface: SmartCache
Places a key/value pair into the queue.

Specified by:
put in interface SmartCache<K,V>
Parameters:
key - Key
value - Value
Returns:
the previous value of key or null

get

public V get(K key)
Specified by:
get in interface SmartCache<K,V>

clear

public void clear()
Specified by:
clear in interface SmartCache<K,V>

size

public int size()
Specified by:
size in interface SmartCache<K,V>

iterator

public Iterator<Map.Entry<K,V>> iterator()
Specified by:
iterator in interface Iterable<Map.Entry<K,V>>

SourceForge.net_Logo