Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.net.partition
Class ReadWriteSplittingBackingMap

    java.lang.Object
      java.util.AbstractMap
          com.tangosol.net.cache.ReadWriteBackingMap
              com.tangosol.net.partition.ReadWriteSplittingBackingMap

All Implemented Interfaces:
  CacheMap, PartitionAwareBackingMap, ObservableMap, java.util.Map

    public class ReadWriteSplittingBackingMap

extends ReadWriteBackingMap
implements PartitionAwareBackingMap

A PartitionAwareBackingMap extension to the ReadWriteBackingMap.

Since:
  Coherence 3.5
Author:
  cp 2009-01-09

Nested Class Summary

Nested classes/interfaces inherited from class com.tangosol.net.cache.ReadWriteBackingMap
`ReadWriteBackingMap.CacheLoaderCacheStore, ReadWriteBackingMap.CacheStoreWrapper, ReadWriteBackingMap.EntrySet, ReadWriteBackingMap.EvictingBackupMap, ReadWriteBackingMap.InternalMapListener, ReadWriteBackingMap.KeySet, ReadWriteBackingMap.ReadLatch, ReadWriteBackingMap.ReadQueue, ReadWriteBackingMap.ReadThread, ReadWriteBackingMap.ValuesCollection, ReadWriteBackingMap.WriteQueue, ReadWriteBackingMap.WriteThread`

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

Field Summary

Fields inherited from class com.tangosol.net.cache.ReadWriteBackingMap
`GUARD_RECOVERY, m_listenerSupport, NO_VALUE`

Fields inherited from interface com.tangosol.net.cache.CacheMap
`EXPIRY_DEFAULT, EXPIRY_NEVER`

Constructor Summary
`ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService, PartitionAwareBackingMap mapInternal, java.util.Map mapMisses, CacheLoader loader)` Construct a ReadWriteSplittingBackingMap.
`ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService, PartitionAwareBackingMap mapInternal, java.util.Map mapMisses, CacheLoader loader, boolean fReadOnly, int cWriteBehindSeconds, double dflRefreshAheadFactor)` Construct a ReadWriteSplittingBackingMap.

Method Summary
`void` | `createPartition(int nPid)` Add a partition to the PartitionAwareBackingMap.
`void` | `destroyPartition(int nPid)` Remove a partition from the PartitionAwareBackingMap.
`BackingMapManager` | `getBackingMapManager()` // ----- PartitionAwareBackingMap interface ----------------------------- /** Obtain the BackingMapManager that this PartitionAwareBackingMap uses to instantiate and release backing maps.
`java.lang.String` | `getName()` Determine the name of the cache for which this PartitionAwareBackingMap exists.
`PartitionAwareBackingMap` | `getPartitionAwareBackingMap()` Obtain the PartitionAwareBackingMap that this ReadWriteBackingMap uses as its backing map.
`java.util.Map` | `getPartitionMap(int nPid)` Obtain a Map view for the data in a specific partition.
`java.util.Map` | `getPartitionMap(PartitionSet partitions)` Obtain a Map view for the data in a specific set of partitions.

Methods inherited from class com.tangosol.net.cache.ReadWriteBackingMap
`addMapListener, addMapListener, addMapListener, clear, configureCacheStore, configureInternalCache, configureReadThread, configureWriteThread, containsKey, containsValue, entrySet, equals, flush, flush, get, getAll, getCachedOrPending, getCacheStore, getCacheStoreTimeoutMillis, getContext, getControlMap, getInternalCache, getInternalConfigurableCache, getInternalListener, getMissesCache, getReadQueue, getReadThread, getRefreshAheadFactor, getSyntheticEventsMap, getWriteBatchFactor, getWriteBehindMillis, getWriteBehindSeconds, getWriteQueue, getWriteRequeueThreshold, getWriteThread, hashCode, heartbeat, instantiateCacheLoaderCacheStore, instantiateCacheStoreWrapper, instantiateControlMap, instantiateEntrySet, instantiateInternalListener, instantiateKeySet, instantiateReadLatch, instantiateReadQueue, instantiateReadThread, instantiateValuesCollection, instantiateWriteQueue, instantiateWriteThread, isActive, isReadOnly, isRefreshAhead, isRethrowExceptions, isWriteBehind, isWriteThrough, keySet, put, put, putInternal, release, remove, removeFromWriteQueue, removeMapListener, removeMapListener, removeMapListener, setCacheStoreTimeoutMillis, setRefreshAheadFactor, setRethrowExceptions, setWriteBatchFactor, setWriteBehindMillis, setWriteBehindSeconds, setWriteRequeueThreshold, size, terminateReadThread, terminateWriteThread, toString, values, waitFor`

Methods inherited from class java.util.AbstractMap
`clone, isEmpty, putAll`

Methods inherited from interface java.util.Map
`clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values`

Constructor Detail

### ReadWriteSplittingBackingMap

    public ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService,
                                        PartitionAwareBackingMap mapInternal,
                                        java.util.Map mapMisses,
                                        CacheLoader loader)

  Construct a ReadWriteSplittingBackingMap.

  Parameters:
    `ctxService` - the context provided by the CacheService which is using this backing map
    `mapInternal` - the PartitionAwareBackingMap used to store the data internally in this backing map; it must implement the ObservableMap interface
    `mapMisses` - the Map used to cache CacheLoader misses (optional)
    `loader` - the object responsible for the persistence of the cached data (optional)

### ReadWriteSplittingBackingMap

    public ReadWriteSplittingBackingMap(BackingMapManagerContext ctxService,
                                        PartitionAwareBackingMap mapInternal,
                                        java.util.Map mapMisses,
                                        CacheLoader loader,
                                        boolean fReadOnly,
                                        int cWriteBehindSeconds,
                                        double dflRefreshAheadFactor)

  Construct a ReadWriteSplittingBackingMap.

  Parameters:
    `ctxService` - the context provided by the CacheService which is using this backing map
    `mapInternal` - the PartitionAwareBackingMap used to store the data internally in this backing map; it must implement the ObservableMap interface
    `mapMisses` - the Map used to cache CacheStore misses (optional)
    `loader` - the object responsible for the persistence of the cached data (optional)
    `fReadOnly` - pass true is the specified loader is in fact a CacheStore that needs to be used only for read operations; changes to the cache will not be persisted
    `cWriteBehindSeconds` - number of seconds to write if there is a CacheStore; zero disables write-behind caching, which (combined with !fReadOnly) implies write-through
    `dflRefreshAheadFactor` - the interval before an entry expiration time (expressed as a percentage of the internal cache expiration interval) during which an asynchronous load request for the entry will be scheduled; zero disables refresh-ahead; only applicable when the `mapInternal` parameter is an instance of `LocalCache`

Method Detail

### getBackingMapManager

    public BackingMapManager getBackingMapManager()

  // ----- PartitionAwareBackingMap interface ----------------------------- /** Obtain the BackingMapManager that this PartitionAwareBackingMap uses to instantiate and release backing maps.

  Specified by:
    `getBackingMapManager` in interface `PartitionAwareBackingMap`
  Returns:
    the BackingMapManager

### getName

    public java.lang.String getName()

  Determine the name of the cache for which this PartitionAwareBackingMap exists.

  Specified by:
    `getName` in interface `PartitionAwareBackingMap`
  Returns:
    the cache name

### createPartition

    public void createPartition(int nPid)

  Add a partition to the PartitionAwareBackingMap.

  Specified by:
    `createPartition` in interface `PartitionAwareBackingMap`
  Parameters:
    `nPid` - the partition id that the PartitionAwareBackingMap will be responsible for, starting at this instant

### destroyPartition

    public void destroyPartition(int nPid)

  Remove a partition from the PartitionAwareBackingMap.

  Specified by:
    `destroyPartition` in interface `PartitionAwareBackingMap`
  Parameters:
    `nPid` - the partition id that the PartitionAwareBackingMap will no longer be responsible for, starting at this instant

### getPartitionMap

    public java.util.Map getPartitionMap(int nPid)

  Obtain a Map view for the data in a specific partition.

  Specified by:
    `getPartitionMap` in interface `PartitionAwareBackingMap`
  Parameters:
    `nPid` - the partition ID
  Returns:
    the backing map (or null if that partition is not owned)

### getPartitionMap

    public java.util.Map getPartitionMap(PartitionSet partitions)

  Obtain a Map view for the data in a specific set of partitions.

  Specified by:
    `getPartitionMap` in interface `PartitionAwareBackingMap`
  Parameters:
    `partitions` - the masking PartitionSet
  Returns:
    a read-only view into a subset of backing maps

### getPartitionAwareBackingMap

    public PartitionAwareBackingMap getPartitionAwareBackingMap()

  Obtain the PartitionAwareBackingMap that this ReadWriteBackingMap uses as its backing map.

  Returns:
    the internal cache as a PartitionAwareBackingMap

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.