|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.util.AbstractKeyBasedMap
com.tangosol.net.partition.PartitionSplittingBackingMap
public class PartitionSplittingBackingMap
In a partitioned configuration, the PartitionSplittingBackingMap is a "map multi-plexer" that enables multiple backing maps to be used in place of a single backing map. The data and operations related to each partition are routed by the PartitionSplittingBackingMap to a partition-specific backing map. The two primary benefits are:
Also, as with all usage of BinaryMap, if the data are stored off-heap, the proper use of the MaxDirectMemorySize JVM switch will be crucial.
| Nested Class Summary | |
|---|---|
class |
PartitionSplittingBackingMap.AggregatingCacheStatisticsAn implementation of the CacheStatics interface that aggregates across the CacheStatics objects provided by each of the backing maps corresponding to the partitions managed by this PartitionSplittingBackingMap. |
static class |
PartitionSplittingBackingMap.MapArrayThe MapArray is a data structure that provides a mapping between partition IDs and backing maps. |
class |
PartitionSplittingBackingMap.MaskedPartitionMapA read-only view into a subset of backing maps managed by the underlying PartitionSplittingBackingMap. |
class |
PartitionSplittingBackingMap.PartitionedIteratorAn Iterator designed to ensure that a stable copy of each partition's keys is available for the duration of the iteration over its keys. |
| Nested classes/interfaces inherited from class com.tangosol.util.AbstractKeyBasedMap |
|---|
AbstractKeyBasedMap.EntrySet, AbstractKeyBasedMap.KeySet, AbstractKeyBasedMap.ValuesCollection |
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry |
| Constructor Summary | |
|---|---|
PartitionSplittingBackingMap(BackingMapManager bmm, java.lang.String sName)Create a PartitionSplittingBackingMap that will delegate each partition's data and operations to a separate backing map. |
|
| Method Summary | |
|---|---|
void |
clear()Clear all key/value mappings. |
boolean |
containsKey(java.lang.Object oKey)Returns true if this map contains a mapping for the specified key. |
void |
createPartition(int nPid)Add a partition to the PartitionAwareBackingMap. |
void |
destroyPartition(int nPid)Remove a partition from the PartitionAwareBackingMap. |
void |
dispose() |
java.lang.Object |
get(java.lang.Object oKey)Returns the value to which this map maps the specified key. |
protected java.util.Map |
getBackingMap(java.lang.Object oKey)Obtain a backing map for the specified key. |
BackingMapManager |
getBackingMapManager()Obtain the BackingMapManager that this PartitionAwareBackingMap uses to instantiate and release backing maps. |
CacheStatistics |
getCacheStatistics()Returns the CacheStatistics for this cache. |
protected BackingMapManagerContext |
getContext()Obtain the BackingMapManagerContext that provides the partition information for keys that are stored in the backing map. |
protected PartitionSplittingBackingMap.MapArray |
getMapArray()Get the mapping between partition IDs and backing maps. |
java.lang.String |
getName()Determine the name of the cache for which this PartitionAwareBackingMap exists. |
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. |
boolean |
isEmpty()Returns true if this map contains no key-value mappings. |
protected boolean |
isEmpty(java.util.Map[] amap)Return true iff a subset of the maps that belong to specified partitions contains no entries. |
boolean |
isStrict()Determine if any access to data in missing partitions is being treated as an error. |
protected java.util.Iterator |
iterateKeys()Create an iterator over the keys in this Map. |
protected java.util.Iterator |
iterateKeys(java.util.Map[] amap)Create an iterator over the keys in maps that belong to partitions contained in the specified PartitionSet. |
protected java.lang.String |
makeName(java.lang.String sName, int nPid)Format a synthetic name for a partition-specific backing map. |
java.lang.Object |
put(java.lang.Object oKey, java.lang.Object oValue)Associates the specified value with the specified key in this map. |
void |
putAll(java.util.Map map)Copies all of the mappings from the specified map to this map. |
protected void |
putAllInternal(java.util.Map mapPart, java.util.Map mapUpdate)Put all entries in mapUpdate into the provided map. |
protected java.lang.Object |
putInternal(java.util.Map mapPart, java.lang.Object oKey, java.lang.Object oValue)Put the key and value into a map representing a given partition. |
java.lang.Object |
remove(java.lang.Object oKey)Removes the mapping for this key from this map if present. |
protected void |
reportMissingPartition(java.lang.Object oKey, int nPid)Report a missing partition according to the "strict" flag rules. |
void |
setStrict(boolean fStrict)Specify whether any access to data in missing partitions should be treated as an error. |
int |
size()Returns the number of key-value mappings in this map. |
protected int |
size(java.util.Map[] amap)Return the number of key-value mappings in a subset of the maps that belong to specified partitions. |
java.lang.String |
toString()Return a human-readable description for this PartitionBackingMap. |
java.lang.String |
toString(boolean fVerbose)Return a human-readable description for this PartitionBackingMap. |
| Methods inherited from class com.tangosol.util.AbstractKeyBasedMap |
|---|
clone, containsValue, entrySet, equals, getAll, hashCode, instantiateEntrySet, instantiateKeySet, instantiateValues, keySet, removeBlind, values |
| Methods inherited from interface java.util.Map |
|---|
containsValue, entrySet, equals, hashCode, keySet, values |
| Constructor Detail |
|---|
public PartitionSplittingBackingMap(BackingMapManager bmm,
java.lang.String sName)
bmm - a BackingMapManager that knows how to create and release the backing maps that this PartitionSplittingBackingMap is responsible forsName - the cache name for which this backing map exists| Method Detail |
|---|
public void clear()
clear in interface java.util.Mapclear in class AbstractKeyBasedMappublic boolean containsKey(java.lang.Object oKey)
containsKey in interface java.util.MapcontainsKey in class AbstractKeyBasedMappublic java.lang.Object get(java.lang.Object oKey)
get in interface java.util.Mapget in class AbstractKeyBasedMapoKey - the key objectpublic boolean isEmpty()
isEmpty in interface java.util.MapisEmpty in class AbstractKeyBasedMap
public java.lang.Object put(java.lang.Object oKey,
java.lang.Object oValue)
put in interface java.util.Mapput in class AbstractKeyBasedMapoKey - key with which the specified value is to be associatedoValue - value to be associated with the specified keypublic void putAll(java.util.Map map)
AbstractKeyBasedMap.put(java.lang.Object, java.lang.Object) on this map once for each mapping in the passed map. The behavior of this operation is unspecified if the passed map is modified while the operation is in progress.putAll in interface java.util.MapputAll in class AbstractKeyBasedMapmap - the Map containing the key/value pairings to put into this Mappublic java.lang.Object remove(java.lang.Object oKey)
remove in interface java.util.Mapremove in class AbstractKeyBasedMapoKey - key whose mapping is to be removed from the mappublic int size()
size in interface java.util.Mapsize in class AbstractKeyBasedMapprotected java.util.Iterator iterateKeys()
iterateKeys in class AbstractKeyBasedMappublic CacheStatistics getCacheStatistics()
public BackingMapManager getBackingMapManager()
getBackingMapManager in interface PartitionAwareBackingMappublic java.lang.String getName()
getName in interface PartitionAwareBackingMappublic void createPartition(int nPid)
createPartition in interface PartitionAwareBackingMapnPid - the partition id that the PartitionAwareBackingMap will be responsible for, starting at this instantpublic void destroyPartition(int nPid)
destroyPartition in interface PartitionAwareBackingMapnPid - the partition id that the PartitionAwareBackingMap will no longer be responsible for, starting at this instantpublic java.util.Map getPartitionMap(int nPid)
getPartitionMap in interface PartitionAwareBackingMapnPid - the partition IDpublic java.util.Map getPartitionMap(PartitionSet partitions)
getPartitionMap in interface PartitionAwareBackingMappartitions - the masking PartitionSetpublic void dispose()
dispose in interface com.oracle.common.base.Disposablepublic boolean isStrict()
public void setStrict(boolean fStrict)
fStrict - if true, any access to missing partitions should being treated as error
protected java.lang.Object putInternal(java.util.Map mapPart,
java.lang.Object oKey,
java.lang.Object oValue)
mapPart - a partition mapoKey - oKey with which the specified value is to be associatedoValue - oValue to be associated with the specified oKey
protected void putAllInternal(java.util.Map mapPart,
java.util.Map mapUpdate)
mapPart - a partition mapmapUpdate - the Map containing the key/value pairings to put into mapPartprotected BackingMapManagerContext getContext()
protected int size(java.util.Map[] amap)
amap - the array of maps to processprotected boolean isEmpty(java.util.Map[] amap)
amap - the array of maps to processprotected java.util.Iterator iterateKeys(java.util.Map[] amap)
amap - the array of maps to processprotected PartitionSplittingBackingMap.MapArray getMapArray()
protected java.util.Map getBackingMap(java.lang.Object oKey)
oKey - the key
protected java.lang.String makeName(java.lang.String sName,
int nPid)
sName - the name of the cachenPid - the partition numberpublic java.lang.String toString()
toString in class AbstractKeyBasedMappublic java.lang.String toString(boolean fVerbose)
fVerbose - if true, generate a verbose descrition
protected void reportMissingPartition(java.lang.Object oKey,
int nPid)
oKey - the key for which an operation failed (optional)nPid - the missing partition; meaningful only if oKey is null
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||