Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


com.tangosol.net.cache
Class CacheStoreMap

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.ConverterCollections.ConverterMap
          extended by com.tangosol.net.cache.CacheStoreMap

All Implemented Interfaces:
java.io.Serializable, java.util.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

Nested Class Summary
static class CacheStoreMap.ReadWriteMap
          A Map implementation that delegates straight through to a CacheStore.

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry

 

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
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, toString, values

 

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

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.7.0.0

E18683-01


Copyright © 2000, 2011, Oracle and/or its affiliates. All rights reserved.