|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.oracle.common.collections.ConverterCollections.ConverterMap
com.tangosol.util.ConverterCollections.ConverterMap
com.tangosol.util.ConverterCollections.ConverterObservableMap
com.tangosol.util.ConverterCollections.ConverterCacheMap
public static class ConverterCollections.ConverterCacheMap
A Converter CacheMap views an underlying CacheMap through a set of key and value Converters.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry |
Field Summary |
---|
Fields inherited from class com.oracle.common.collections.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.ConverterCacheMap(CacheMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown) Constructor. |
Method Summary | |
---|---|
java.util.Map |
getAll(java.util.Collection colKeys) Get all the specified keys, if they are in the cache. |
CacheMap |
getCacheMap() Return the underlying CacheMap. |
java.lang.Object |
put(java.lang.Object oKey, java.lang.Object oValue, long cMillis) Associates the specified value with the specified key in this cache. |
Methods inherited from class com.tangosol.util.ConverterCollections.ConverterObservableMap |
---|
addMapListener, addMapListener, addMapListener, getConverterListener, getObservableMap, removeMapListener, removeMapListener, removeMapListener |
Methods inherited from class com.tangosol.util.ConverterCollections.ConverterMap |
---|
getConverterKeyDown, getConverterKeyUp, getConverterValueDown, getConverterValueUp |
Methods inherited from class com.oracle.common.collections.ConverterCollections.ConverterMap |
---|
clear, containsKey, containsValue, entrySet, equals, get, getMap, hashCode, instantiateCollection, instantiateEntrySet, instantiateMap, instantiateSet, isEmpty, keySet, put, putAll, remove, size, toString, values |
Methods inherited from interface com.tangosol.net.cache.CacheMap |
---|
put |
Methods inherited from interface com.tangosol.util.ObservableMap |
---|
addMapListener, addMapListener, addMapListener, removeMapListener, removeMapListener, removeMapListener |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, values |
Constructor Detail |
---|
public ConverterCollections.ConverterCacheMap(CacheMap map, Converter convKeyUp, Converter convKeyDown, Converter convValUp, Converter convValDown)
map
- the underlying CacheMapconvKeyUp
- the Converter to view the underlying CacheMap's keys throughconvKeyDown
- the Converter to use to pass keys down to the underlying CacheMapconvValUp
- the Converter to view the underlying CacheMap's values throughconvValDown
- the Converter to use to pass values down to the underlying CacheMapMethod Detail |
---|
public java.util.Map getAll(java.util.Collection colKeys)
The result of this method is defined to be semantically the same as the following implementation, without regards to threading issues:
Map map = new AnyMap(); // could be a HashMap (but does not have to) for (Iterator iter = colKeys.iterator(); iter.hasNext(); ) { Object oKey = iter.next(); Object oVal = get(oKey); if (oVal != null || containsKey(oKey)) { map.put(oKey, oVal); } } return map;
getAll
in interface CacheMap
colKeys
- a collection of keys that may be in the named cachepublic java.lang.Object put(java.lang.Object oKey, java.lang.Object oValue, long cMillis)
CacheMap.put(Object oKey, Object oValue)
method allows the caller to specify an expiry (or "time to live") for the cache entry.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"; pass CacheMap.EXPIRY_DEFAULT
to use the cache's default time-to-live setting; pass CacheMap.EXPIRY_NEVER
to indicate that the cache entry should never expire; this milliseconds value is not a date/time value, such as is returned from System.currentTimeMillis()public CacheMap getCacheMap()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |