|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CacheMap
A CacheMap is a Map that supports caching. This interface will be eventually replaced by the javax.cache.Cache interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry |
Field Summary | |
---|---|
static long |
EXPIRY_DEFAULT A special time-to-live value that can be passed to the extended put method to indicate that the cache's default expiry should be used. |
static long |
EXPIRY_NEVER A special time-to-live value that can be passed to the extended put method to indicate that the cache entry should never expire. |
Method Summary | |
---|---|
java.util.Map |
getAll(java.util.Collection colKeys) Get all the specified keys, if they are in the cache. |
java.lang.Object |
put(java.lang.Object oKey, java.lang.Object oValue) Associates the specified value with the specified key in this cache. |
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 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 |
Field Detail |
---|
static final long EXPIRY_DEFAULT
put
method to indicate that the cache's default expiry should be used.
static final long EXPIRY_NEVER
put
method to indicate that the cache entry should never expire.
Method Detail |
---|
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;
colKeys
- a collection of keys that may be in the named cachejava.lang.Object put(java.lang.Object oKey, java.lang.Object oValue)
Invoking this method is equivalent to the following call:
put(oKey, oValue, EXPIRY_DEFAULT);
put
in interface java.util.Map
oKey
- key with which the specified value is to be associatedoValue
- value to be associated with the specified keyjava.lang.Object put(java.lang.Object oKey, java.lang.Object oValue, long cMillis)
put(Object oKey, Object oValue)
method allows the caller to specify an expiry (or "time to live") for the cache entry.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 EXPIRY_DEFAULT
to use the cache's default time-to-live setting; pass 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()java.lang.UnsupportedOperationException
- if the requested expiry is a positive value and the implementation does not support expiry of cache entries
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |