Class 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:

    1. The CacheHandler for the backing Map may use the clear() method as part of setup and tear-down.
    2. 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
    • 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 map
        loader - 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 map
        store - 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 map
        store - the CacheStore to delegate read and write operations to
        fBlind - pass true to optimize put() and remove() by allowing them to skip the loading of old values