Package com.tangosol.net.partition
Interface PartitionAwareBackingMap
- All Superinterfaces:
Map
- All Known Implementing Classes:
ObservableSplittingBackingCache
,ObservableSplittingBackingCache.CapacityAwareMap
,ObservableSplittingBackingMap
,PartitionSplittingBackingMap
,ReadWriteSplittingBackingMap
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
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createPartition
(int nPid) Add a partition to the PartitionAwareBackingMap.void
destroyPartition
(int nPid) Remove a partition from the PartitionAwareBackingMap.Obtain the BackingMapManager that this PartitionAwareBackingMap uses to instantiate and release backing maps.getName()
Determine the name of the cache for which this PartitionAwareBackingMap exists.getPartitionMap
(int nPid) Obtain a Map view for the data in a specific partition.getPartitionMap
(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 Details
-
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
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
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
-