Package com.tangosol.net.cache
Class CacheStoreMap
java.lang.Object
com.tangosol.util.ConverterCollections.ConverterMap
com.tangosol.net.cache.CacheStoreMap
- All Implemented Interfaces:
Serializable
,Map
A backing Map implementation that delegates all operations to a CacheStore.
Note: The clear() method is explicitly not implemented. Items can be removed individually, but the suggested usage is to indicate item deletion by state change, such as by setting a persistent "item-deleted" flag. There are two reasons for this:
- The CacheHandler for the backing Map may use the clear() method as part of setup and tear-down.
- Deletions are not replicatable to new members, since there is no record of the deletions having occurred. To be certain that new members are aware of items having been deleted, the "evidence" of the deletion must be recorded (i.e. as part of the "deleted" item's state).
- Since:
- Coherence 3.2
- Author:
- cp 2006.09.06
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A Map implementation that delegates straight through to a CacheStore. -
Field Summary
Fields inherited from class com.tangosol.util.ConverterCollections.ConverterMap
m_convKeyDown, m_convKeyUp, m_convValDown, m_convValUp, m_map, m_set
-
Constructor Summary
ConstructorDescriptionCacheStoreMap
(BackingMapManagerContext ctx, CacheStore store) Construct a read/write CacheStoreMap.CacheStoreMap
(BackingMapManagerContext ctx, CacheStore store, boolean fBlind) Construct a read/write CacheStoreMap.CacheStoreMap
(BackingMapManagerContext ctx, IterableCacheLoader loader) Construct a read-only CacheStoreMap. -
Method Summary
Methods inherited from class com.tangosol.util.ConverterCollections.ConverterMap
clear, containsKey, containsValue, entrySet, equals, get, getConverterKeyDown, getConverterKeyUp, getConverterValueDown, getConverterValueUp, getMap, hashCode, instantiateCollection, instantiateEntrySet, instantiateMap, instantiateSet, isEmpty, keySet, put, putAll, remove, size, subMap, toString, values
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
CacheStoreMap
Construct a read-only CacheStoreMap.- Parameters:
ctx
- the context provided by the CacheService which is using this backing maploader
- the CacheLoader to delegate read operations to
-
CacheStoreMap
Construct a read/write CacheStoreMap.- Parameters:
ctx
- the context provided by the CacheService which is using this backing mapstore
- the CacheStore to delegate read and write operations to
-
CacheStoreMap
Construct a read/write CacheStoreMap.- Parameters:
ctx
- the context provided by the CacheService which is using this backing mapstore
- the CacheStore to delegate read and write operations tofBlind
- pass true to optimize put() and remove() by allowing them to skip the loading of old values
-