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
public class CacheStoreMap extends ConverterCollections.ConverterMap
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:
- Serialized Form
-
-
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
Constructors Constructor Description CacheStoreMap(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 Detail
-
CacheStoreMap
public CacheStoreMap(BackingMapManagerContext ctx, IterableCacheLoader loader)
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
public CacheStoreMap(BackingMapManagerContext ctx, CacheStore store)
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
public CacheStoreMap(BackingMapManagerContext ctx, CacheStore store, boolean fBlind)
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
-
-