|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.ConverterCollections.ConverterMap
com.tangosol.util.ConverterCollections.ConverterObservableMap
public static class ConverterCollections.ConverterObservableMap
A Converter ObservableMap views an underlying ObservableMap through a set of key and value Converters.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.tangosol.util.QueryMap |
---|
QueryMap.Entry |
Field Summary |
---|
Fields inherited from class com.tangosol.util.ConverterCollections.ConverterMap |
---|
m_convKeyDown, m_convKeyUp, m_convValDown, m_convValUp, m_map, m_set |
Fields inherited from interface com.tangosol.net.cache.CacheMap |
---|
EXPIRY_DEFAULT, EXPIRY_NEVER |
Constructor Summary | |
---|---|
ConverterCollections.ConverterObservableMap(ObservableMap map,
Converter convKeyUp,
Converter convKeyDown,
Converter convValUp,
Converter convValDown)
Constructor. |
Method Summary | |
---|---|
void |
addMapListener(MapListener listener)
Add a standard map listener that will receive all events (inserts, updates, deletes) that occur against the map, with the key, old-value and new-value included. |
void |
addMapListener(MapListener listener,
Filter filter,
boolean fLite)
Add a map listener that receives events based on a filter evaluation. |
void |
addMapListener(MapListener listener,
Object oKey,
boolean fLite)
Add a map listener for a specific key. |
Map |
getAll(Collection colKeys)
Get all the specified keys, if they are in the cache. |
protected MapListener |
getConverterListener(MapListener listener)
Create a converter listener for the specified listener. |
Object |
put(Object oKey,
Object oValue,
long cMillis)
Associates the specified value with the specified key in this cache. |
void |
removeMapListener(MapListener listener)
Remove a standard map listener that previously signed up for all events. |
void |
removeMapListener(MapListener listener,
Filter filter)
Remove a map listener that previously signed up for events based on a filter evaluation. |
void |
removeMapListener(MapListener listener,
Object oKey)
Remove a map listener that previously signed up for events about a specific key. |
Methods inherited from class com.tangosol.util.ConverterCollections.ConverterMap |
---|
addIndex, clear, containsKey, containsValue, entrySet, entrySet, entrySet, get, instantiateCollection, instantiateEntrySet, instantiateMap, instantiateSet, isEmpty, keySet, keySet, put, putAll, remove, removeIndex, size, toString, values |
Methods inherited from interface com.tangosol.net.cache.CacheMap |
---|
put |
Constructor Detail |
---|
public ConverterCollections.ConverterObservableMap(ObservableMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)
map
- the underlying SortedMapconvKeyUp
- the Converter to view the underlying
SortedMap's keys throughconvKeyDown
- the Converter to use to pass keys down to the
underlying SortedMapconvValUp
- the Converter to view the underlying
SortedMap's values throughconvValDown
- the Converter to use to pass values down to the
underlying SortedMapMethod Detail |
---|
public void addMapListener(MapListener listener)
addMapListener(listener, (Filter) null, false);
addMapListener
in interface ObservableMap
listener
- the MapEvent
listener to addpublic void removeMapListener(MapListener listener)
removeMapListener(listener, (Filter) null);
removeMapListener
in interface ObservableMap
listener
- the listener to removepublic void addMapListener(MapListener listener, Object oKey, boolean fLite)
The listeners will receive MapEvent objects, but if fLite is passed as true, they might not contain the OldValue and NewValue properties.
To unregister the MapListener, use the
removeMapListener(MapListener, Object)
method.
addMapListener
in interface ObservableMap
listener
- the MapEvent
listener to addoKey
- the key that identifies the entry for which to raise
eventsfLite
- true to indicate that the MapEvent
objects do
not have to include the OldValue and NewValue
property values in order to allow optimizationspublic void removeMapListener(MapListener listener, Object oKey)
removeMapListener
in interface ObservableMap
listener
- the listener to removeoKey
- the key that identifies the entry for which to raise
eventspublic void addMapListener(MapListener listener, Filter filter, boolean fLite)
The listeners will receive MapEvent objects, but if fLite is passed as true, they might not contain the OldValue and NewValue properties.
To unregister the MapListener, use the
removeMapListener(MapListener, Filter)
method.
addMapListener
in interface ObservableMap
listener
- the MapEvent
listener to addfilter
- a filter that will be passed MapEvent objects to select
from; a MapEvent will be delivered to the listener only
if the filter evaluates to true for that MapEvent;
null is equivalent to a filter that alway returns truefLite
- true to indicate that the MapEvent
objects do
not have to include the OldValue and NewValue
property values in order to allow optimizationspublic void removeMapListener(MapListener listener, Filter filter)
removeMapListener
in interface ObservableMap
listener
- the listener to removefilter
- a filter used to evaluate events; null is equivalent to
a filter that alway returns truepublic Map getAll(Collection colKeys)
getAll
in interface CacheMap
colKeys
- a collection of keys that may be in the named cache
public Object put(Object oKey, Object oValue, long cMillis)
put
in interface CacheMap
oKey
- key with which the specified value is to be associatedoValue
- value to be associated with the specified keycMillis
- the number of milliseconds until the cache entry will
expire, also referred to as the entry's "time to live"
UnsupportedOperationException
- if the requested expiry is a
positive value and the implementation does not support expiry
of cache entriesprotected MapListener getConverterListener(MapListener listener)
listener
- the underlying listener
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |