Package com.tangosol.net.partition
Interface PartitionAwareBackingMap
-
- All Superinterfaces:
Map
- All Known Implementing Classes:
ObservableSplittingBackingCache,ObservableSplittingBackingCache.CapacityAwareMap,ObservableSplittingBackingMap,PartitionSplittingBackingMap,ReadWriteSplittingBackingMap
public interface PartitionAwareBackingMap extends Map
In a partitioned configuration, backing maps that implement the PartitionAwareBackingMap interface are able to react to the partition life-cycle (a partition showing up on a node, or moving away from a node) and manage data more efficiently as a result.- Since:
- Coherence 3.5
- Author:
- cp 2008-11-20
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreatePartition(int nPid)Add a partition to the PartitionAwareBackingMap.voiddestroyPartition(int nPid)Remove a partition from the PartitionAwareBackingMap.BackingMapManagergetBackingMapManager()Obtain the BackingMapManager that this PartitionAwareBackingMap uses to instantiate and release backing maps.StringgetName()Determine the name of the cache for which this PartitionAwareBackingMap exists.MapgetPartitionMap(int nPid)Obtain a Map view for the data in a specific partition.MapgetPartitionMap(PartitionSet partitions)Obtain a Map view for the data in a specific set of partitions.-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
getBackingMapManager
BackingMapManager getBackingMapManager()
Obtain the BackingMapManager that this PartitionAwareBackingMap uses to instantiate and release backing maps.- Returns:
- the BackingMapManager
-
getName
String getName()
Determine the name of the cache for which this PartitionAwareBackingMap exists.- Returns:
- the cache name
-
createPartition
void createPartition(int nPid)
Add a partition to the PartitionAwareBackingMap.- Parameters:
nPid- the partition id that the PartitionAwareBackingMap will be responsible for, starting at this instant
-
destroyPartition
void destroyPartition(int nPid)
Remove a partition from the PartitionAwareBackingMap.- Parameters:
nPid- the partition id that the PartitionAwareBackingMap will no longer be responsible for, starting at this instant
-
getPartitionMap
Map getPartitionMap(int nPid)
Obtain a Map view for the data in a specific partition.- Parameters:
nPid- the partition ID- Returns:
- the backing map (or null if that partition is not owned)
-
getPartitionMap
Map getPartitionMap(PartitionSet partitions)
Obtain a Map view for the data in a specific set of partitions.- Parameters:
partitions- the masking PartitionSet- Returns:
- a read-only view into a subset of backing maps
-
-