org.jacorb.notification.util

Class CachingWildcardMap

public class CachingWildcardMap extends Object implements WildcardMap

Add Caching to WildcardMap. If the Keys inside the Map contain the Wildcard Operator '*' the Operation getWithExpansion is rather timeconsuming. For each Key that contains a '*' a pattern match must be done. This Decorator adds simple Caching. When a key is looked up the retrieved value is stored in an internal cache with fixed size. Subsequent calls to getWithExpansion query the cache first. As soon as a put or remove Operation occurs the Cache is invalidated.

Version: $Id: CachingWildcardMap.java,v 1.5 2005/02/14 00:13:05 alphonse.bendt Exp $

Author: Alphonse Bendt

Constructor Summary
CachingWildcardMap()
CachingWildcardMap(int cacheSize, WildcardMap delegate)
Method Summary
voidclear()
ObjectgetNoExpansion(Object key)
Object[]getWithExpansion(Object key)
Objectput(Object key, Object value)
Objectremove(Object key)

Constructor Detail

CachingWildcardMap

public CachingWildcardMap()

CachingWildcardMap

public CachingWildcardMap(int cacheSize, WildcardMap delegate)

Method Detail

clear

public void clear()

getNoExpansion

public Object getNoExpansion(Object key)

getWithExpansion

public Object[] getWithExpansion(Object key)

put

public Object put(Object key, Object value)

remove

public Object remove(Object key)