mondrian.rolap.cache
Interface SmartCache<K,V>

All Superinterfaces:
Iterable<Map.Entry<K,V>>
All Known Implementing Classes:
HardSmartCache, SoftSmartCache

public interface SmartCache<K,V>
extends Iterable<Map.Entry<K,V>>

Defines a cache API. Implementations exist for hard and soft references.

This interface implements the Iterable. The Iterable.iterator() method returns an iterator over all entries in the cache. The iterator is mutable.

Since:
Nov 21, 2005
Author:
av

Method Summary
 void clear()
           
 V get(K key)
           
 V put(K key, V value)
          Places a key/value pair into the queue.
 V remove(K key)
          Removes a key from the cache.
 int size()
           
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

put

V put(K key,
      V value)
Places a key/value pair into the queue.

Parameters:
key - Key
value - Value
Returns:
the previous value of key or null

get

V get(K key)

remove

V remove(K key)
Removes a key from the cache.

Parameters:
key - Key
Returns:
Previous value associated with the key

clear

void clear()

size

int size()

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads