|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jacorb.notification.util.CachingWildcardMap
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.
Constructor Summary | |
---|---|
CachingWildcardMap()
|
|
CachingWildcardMap(int cacheSize,
WildcardMap delegate)
|
Method Summary | |
---|---|
void |
clear()
clear this map |
java.lang.Object |
getNoExpansion(java.lang.Object key)
Returns the value to which this map maps the specified key. |
java.lang.Object[] |
getWithExpansion(java.lang.Object key)
Returns the value to which this map maps the specified key. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
The operation put associates the specified value with the specified key in
this map. |
java.lang.Object |
remove(java.lang.Object key)
remove the specified key from this Map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CachingWildcardMap()
public CachingWildcardMap(int cacheSize, WildcardMap delegate)
Method Detail |
public void clear()
WildcardMap
clear
in interface WildcardMap
public java.lang.Object remove(java.lang.Object key)
WildcardMap
remove
in interface WildcardMap
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
WildcardMap
put
associates the specified value with the specified key in
this map. The String representation of the Key toString()
is used. If the map previously contained a mapping for this key, the old value is replaced by
the specified value.
put
in interface WildcardMap
key
- key with which String representation the specified value is to be associated.value
- value to be associated with the specified key.
public java.lang.Object[] getWithExpansion(java.lang.Object key)
WildcardMap
getWithExpansion
in interface WildcardMap
key
- key whose associated value is to be returned
public java.lang.Object getNoExpansion(java.lang.Object key)
WildcardMap
getNoExpansion
in interface WildcardMap
key
- key whose associated value is to be returned
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |