Class CacheAffinityChangeMessage

  • All Implemented Interfaces:
    Serializable, DiscoveryCustomMessage

    public class CacheAffinityChangeMessage
    extends Object
    implements DiscoveryCustomMessage
    CacheAffinityChangeMessage represent a message that switches to a new affinity assignmentafter rebalance is finished. This message should not be mutated in any way outside the "disco-notifier-worker" thread.
    See Also:
    Serialized Form
    • Constructor Detail

      • CacheAffinityChangeMessage

        public CacheAffinityChangeMessage​(AffinityTopologyVersion topVer,
                                          Map<Integer,​IgniteUuid> cacheDeploymentIds)
        Constructor used when message is created after cache rebalance finished.
        Parameters:
        topVer - Topology version.
        cacheDeploymentIds - Cache deployment ID.
    • Method Detail

      • cacheDeploymentIds

        public Map<Integer,​IgniteUuid> cacheDeploymentIds()
        Returns:
        Cache deployment IDs.
      • exchangeNeeded

        public boolean exchangeNeeded()
        Returns:
        True if request should trigger partition exchange.
      • exchangeNeeded

        public void exchangeNeeded​(boolean exchangeNeeded)
        Parameters:
        exchangeNeeded - True if request should trigger partition exchange.
      • assignmentChange

        @Nullable
        public @Nullable Map<Integer,​Map<Integer,​List<UUID>>> assignmentChange()
        Returns:
        Affinity assignments.
      • isMutable

        public boolean isMutable()
        Specified by:
        isMutable in interface DiscoveryCustomMessage
        Returns:
        True if message can be modified during listener notification. Changes will be sent to next nodes.
      • stopProcess

        public void stopProcess​(boolean stopProc)
        Sets stop processing flag. If this flag is true then this message is not passed to other nodes after the coordinator node notitied its own listner. If method ackMessage() returns non-null ack message, it is sent to all nodes. This flag is used when discovery SPI does not support mutable custom messages. See DiscoverySpiMutableCustomMessageSupport.
        Parameters:
        stopProc - If true then this message is not passed to other nodes.