Class TcpConnectionRequestDiscoveryMessage
- java.lang.Object
-
- org.apache.ignite.spi.communication.tcp.internal.TcpConnectionRequestDiscoveryMessage
-
- All Implemented Interfaces:
Serializable,DiscoveryCustomMessage
public class TcpConnectionRequestDiscoveryMessage extends Object implements DiscoveryCustomMessage
Message is part of communication via discovery protocol. It is used when a node (say node A) cannot establish a communication connection to other node (node B) in topology due to firewall or network configuration and sends this message requesting inverse connection: node B receives request and opens communication connection to node A thus allowing both nodes to communicate to each other.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TcpConnectionRequestDiscoveryMessage(UUID receiverNodeId, int connIdx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable DiscoveryCustomMessageackMessage()Called when custom message has been handled by all nodes.intconnectionIndex()DiscoCachecreateDiscoCache(GridDiscoveryManager mgr, AffinityTopologyVersion topVer, DiscoCache discoCache)Creates new discovery cache if message caused topology version change.IgniteUuidid()booleanisMutable()UUIDreceiverNodeId()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage
stopProcess
-
-
-
-
Constructor Detail
-
TcpConnectionRequestDiscoveryMessage
public TcpConnectionRequestDiscoveryMessage(UUID receiverNodeId, int connIdx)
-
-
Method Detail
-
id
public IgniteUuid id()
- Specified by:
idin interfaceDiscoveryCustomMessage- Returns:
- Unique custom message ID.
-
receiverNodeId
public UUID receiverNodeId()
-
connectionIndex
public int connectionIndex()
-
ackMessage
@Nullable public @Nullable DiscoveryCustomMessage ackMessage()
Called when custom message has been handled by all nodes.- Specified by:
ackMessagein interfaceDiscoveryCustomMessage- Returns:
- Ack message or
nullif ack is not required.
-
isMutable
public boolean isMutable()
- Specified by:
isMutablein interfaceDiscoveryCustomMessage- Returns:
Trueif message can be modified during listener notification. Changes will be sent to next nodes.
-
createDiscoCache
public DiscoCache createDiscoCache(GridDiscoveryManager mgr, AffinityTopologyVersion topVer, DiscoCache discoCache)
Creates new discovery cache if message caused topology version change.- Specified by:
createDiscoCachein interfaceDiscoveryCustomMessage- Parameters:
mgr- Discovery manager.topVer- New topology version.discoCache- Current discovery cache.- Returns:
- Reused discovery cache.
-
-