Class GridDhtPartitionSupplier


  • public class GridDhtPartitionSupplier
    extends Object
    Class for supplying partitions to demanding nodes.
    • Method Detail

      • isSupply

        public boolean isSupply()
        Check is cache having any active context for supply.
        Returns:
        True if a node supplies a cache to some other, otherwise is false.
      • handleDemandMessage

        public void handleDemandMessage​(int topicId,
                                        UUID nodeId,
                                        GridDhtPartitionDemandMessage demandMsg)
        For each demand message method lookups (or creates new) supply context and starts to iterate entries across requested partitions. Each entry in iterator is placed to prepared supply message. If supply message size in bytes becomes greater than IgniteConfiguration.getRebalanceBatchSize() method sends this message to demand node and saves partial state of iterated entries to supply context, then restores the context again after new demand message with the same context id is arrived.
        Parameters:
        topicId - Id of the topic is used for the supply-demand communication.
        nodeId - Id of the node which sent the demand message.
        demandMsg - Demand message.