Oracle® Coherence Java API Reference
v3.5.3

E15583-01

com.tangosol.net.partition
Class PartitionSplittingBackingMap.MapArray

java.lang.Object
  extended by com.tangosol.net.partition.PartitionSplittingBackingMap.MapArray
Enclosing class:
PartitionSplittingBackingMap

public static class PartitionSplittingBackingMap.MapArray
extends java.lang.Object

The MapArray is a data structure that provides a mapping between partition IDs and backing maps. It is immutable.


Constructor Summary
PartitionSplittingBackingMap.MapArray(int cPartitions)
          Construct an empty MapArray for a given partition count.
 
Method Summary
 PartitionSplittingBackingMap.MapArray addMap(int nPid, java.util.Map mapBacking)
          Add a new mapping between a partition ID and its backing map.
 java.util.Map getBackingMap(int nPid)
          Obtain the backing map that corresponds to a specified partition.
 java.util.Map[] getBackingMaps()
          Obtain an array of all of the current backing maps, one for each partition.
 java.util.Map[] getBackingMaps(PartitionSet partitions)
          Obtain an array of the current backing maps for the partitions specified in the passed PartitionSet.
 CacheStatistics[] getCacheStatistics()
          Obtain an array of all of the CacheStatistics objects for the current backing maps, one for each partition.
 int[] getPartitions()
          Obtain an array of all of the current partition IDs for which there are backing maps.
 PartitionSet getPartitionSet()
          Obtain a PartitionSet containing partition IDs for which there are backing maps.
 PartitionSplittingBackingMap.MapArray removeMap(int nPid)
          Remove the mapping for the specified partition ID and its corresponding backing map.
 

Constructor Detail

PartitionSplittingBackingMap.MapArray

public PartitionSplittingBackingMap.MapArray(int cPartitions)
Construct an empty MapArray for a given partition count.

Parameters:
cPartitions - the maximum number of partitions
Method Detail

getPartitions

public int[] getPartitions()
Obtain an array of all of the current partition IDs for which there are backing maps.

Returns:
an array of all the partition IDs; the caller must not modify the returned array

getPartitionSet

public PartitionSet getPartitionSet()
Obtain a PartitionSet containing partition IDs for which there are backing maps.

Returns:
a PartitionSet containing all existing partition IDs; the caller must not modify the returned PartitionSet

getBackingMap

public java.util.Map getBackingMap(int nPid)
Obtain the backing map that corresponds to a specified partition.

Parameters:
nPid - the partition id to obtain the backing map for
Returns:
the specified backing map or null if the partition does not have a backing map

getBackingMaps

public java.util.Map[] getBackingMaps()
Obtain an array of all of the current backing maps, one for each partition.

Returns:
an array of all the backing maps; the caller must not modify the returned array

getBackingMaps

public java.util.Map[] getBackingMaps(PartitionSet partitions)
Obtain an array of the current backing maps for the partitions specified in the passed PartitionSet.

Parameters:
partitions - a PartitionSet to mask the backing maps by
Returns:
an array of the backing maps; the caller must not modify the returned array

getCacheStatistics

public CacheStatistics[] getCacheStatistics()
Obtain an array of all of the CacheStatistics objects for the current backing maps, one for each partition. Note that the CacheStatistics object can be null for any/all backing maps.

Returns:
an array of all the CacheStatics objects for the backing maps; the caller must not modify the returned array; the references in the array can be null

addMap

public PartitionSplittingBackingMap.MapArray addMap(int nPid,
                                                    java.util.Map mapBacking)
Add a new mapping between a partition ID and its backing map.

Parameters:
nPid - the partition ID to add
mapBacking - the backing map for the partition to add
Returns:
a new MapArray object containing the specified mapping

removeMap

public PartitionSplittingBackingMap.MapArray removeMap(int nPid)
Remove the mapping for the specified partition ID and its corresponding backing map.

Parameters:
nPid - the partition ID to remove
Returns:
a new MapArray object that does not contain the specified mapping

Oracle® Coherence Java API Reference
v3.5.3

E15583-01

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