Class GridDhtPartitionsSingleMessage

    • Constructor Detail

      • GridDhtPartitionsSingleMessage

        public GridDhtPartitionsSingleMessage()
        Required by Externalizable.
      • GridDhtPartitionsSingleMessage

        public GridDhtPartitionsSingleMessage​(GridDhtPartitionExchangeId exchId,
                                              boolean client,
                                              @Nullable
                                              @Nullable GridCacheVersion lastVer,
                                              boolean compress)
        Parameters:
        exchId - Exchange ID.
        client - Client message flag.
        lastVer - Last version.
        compress - True if it is possible to use compression for message.
    • Method Detail

      • cacheGroupsAffinityRequest

        @Nullable
        public @Nullable Collection<Integer> cacheGroupsAffinityRequest()
        Returns:
        Cache groups to get affinity for (affinity is requested when node joins cluster).
      • handlerId

        public int handlerId()
        Specified by:
        handlerId in class GridCacheMessage
        Returns:
        ID to distinguish message handlers for the same messages but for different caches/cache groups.
      • client

        public boolean client()
        Returns:
        True if sent from client node.
      • addLocalPartitionMap

        public void addLocalPartitionMap​(int cacheId,
                                         GridDhtPartitionMap locMap,
                                         @Nullable
                                         @Nullable Integer dupDataCache)
        Parameters:
        cacheId - Cache ID to add local partition for.
        locMap - Local partition map.
        dupDataCache - Optional ID of cache with the same partition state map.
      • addPartitionUpdateCounters

        public void addPartitionUpdateCounters​(int grpId,
                                               Object cntrMap)
        Parameters:
        grpId - Cache group ID.
        cntrMap - Partition update counters.
      • partitionUpdateCounters

        public CachePartitionPartialCountersMap partitionUpdateCounters​(int grpId,
                                                                        int partsCnt)
        Parameters:
        grpId - Cache group ID.
        partsCnt - Total cache partitions.
        Returns:
        Partition update counters.
      • addPartitionSizes

        public void addPartitionSizes​(int grpId,
                                      Map<Integer,​Long> partSizesMap)
        Adds partition sizes map for specified grpId to the current message.
        Parameters:
        grpId - Group id.
        partSizesMap - Partition sizes map.
      • partitionSizes

        public Map<Integer,​Long> partitionSizes​(int grpId)
        Returns partition sizes map for specified grpId.
        Parameters:
        grpId - Group id.
        Returns:
        Partition sizes map (partId, partSize).
      • partitionHistoryCounters

        public void partitionHistoryCounters​(int grpId,
                                             Map<Integer,​Long> cntrMap)
        Parameters:
        grpId - Cache group ID.
        cntrMap - Partition history counters.
      • setError

        public void setError​(Exception ex)
        Parameters:
        ex - Exception.
      • getError

        @Nullable
        public @Nullable Exception getError()
        Returns:
        Not null exception if exchange processing failed.
      • exchangeStartTime

        public long exchangeStartTime()
        Start time of exchange on node which sent this message.
      • exchangeStartTime

        public void exchangeStartTime​(long exchangeStartTime)
        Parameters:
        exchangeStartTime - Start time of exchange.
      • directType

        public short directType()
        Gets message type.
        Returns:
        Message type.