Class GridDhtPartitionDemander
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemander
-
public class GridDhtPartitionDemander extends Object
Thread pool for requesting partitions from other nodes and populating local cache.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGridDhtPartitionDemander.RebalanceFutureThe future is created for each topology version if some partitions should present by affinity and completed when all partitions are transferred.
-
Constructor Summary
Constructors Constructor Description GridDhtPartitionDemander(CacheGroupContext grp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleSupplyMessage(UUID nodeId, GridDhtPartitionSupplyMessage supplyMsg)Handles supply message fromnodeIdwith specifiedtopicId.protected voidownPartition(GridDhtPartitionDemander.RebalanceFuture fut, int p, UUID nodeId, GridDhtPartitionSupplyMessage supplyMsg)Owns the partition recursively.voidregisterSupplyMessage(UUID nodeId, GridDhtPartitionSupplyMessage supplyMsg, Runnable r)Enqueues supply message.StringtoString()
-
-
-
Constructor Detail
-
GridDhtPartitionDemander
public GridDhtPartitionDemander(CacheGroupContext grp)
- Parameters:
grp- Ccahe group.
-
-
Method Detail
-
registerSupplyMessage
public void registerSupplyMessage(UUID nodeId, GridDhtPartitionSupplyMessage supplyMsg, Runnable r)
Enqueues supply message.
-
handleSupplyMessage
public void handleSupplyMessage(UUID nodeId, GridDhtPartitionSupplyMessage supplyMsg)
Handles supply message fromnodeIdwith specifiedtopicId. Supply message contains entries to populate rebalancing partitions. There is a cyclic process: Populate rebalancing partitions with entries from Supply message. If not all partitions specified inrebalanceFutwere rebalanced or marked as missed send new Demand message to request next batch of entries.- Parameters:
nodeId- Node id.supplyMsg- Supply message.
-
ownPartition
protected void ownPartition(GridDhtPartitionDemander.RebalanceFuture fut, int p, UUID nodeId, GridDhtPartitionSupplyMessage supplyMsg)
Owns the partition recursively.
-
-