Skip to content

Commit e02ac28

Browse files
committed
review fixes
1 parent 02ea1e2 commit e02ac28

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
public class DiscoveryMessageFactory implements MessageFactoryProvider {
5353
/** {@inheritDoc} */
5454
@Override public void registerAll(MessageFactory factory) {
55-
factory.register((short)-101, InetAddressMessage::new, new InetAddressMessageSerializer());
56-
factory.register((short)-100, InetSocketAddressMessage::new, new InetSocketAddressMessageSerializer());
55+
factory.register((short)-101, InetSocketAddressMessage::new, new InetSocketAddressMessageSerializer());
56+
factory.register((short)-100, InetAddressMessage::new, new InetAddressMessageSerializer());
5757

5858
factory.register((short)0, TcpDiscoveryCheckFailedMessage::new, new TcpDiscoveryCheckFailedMessageSerializer());
5959
factory.register((short)1, TcpDiscoveryPingRequest::new, new TcpDiscoveryPingRequestSerializer());

modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ protected IgniteSpiException authenticationFailedError(TcpDiscoveryAuthFailedMes
20192019
assert msg != null;
20202020

20212021
return new IgniteSpiException(new IgniteAuthenticationException("Authentication failed [nodeId=" +
2022-
msg.creatorNodeId() + ", addr=" + msg.address().getHostAddress() + ']'));
2022+
msg.creatorNodeId() + ", addr=" + msg.creatorAddress().getHostAddress() + ']'));
20232023
}
20242024

20252025
/**

modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/InetSocketAddressMessage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.apache.ignite.internal.managers.discovery.DiscoveryMessageFactory;
2323
import org.apache.ignite.internal.util.typedef.internal.S;
2424

25-
/** Address utility container message. Is not a pure {@link TcpDiscoveryAbstractMessage}. */
25+
/** Socket address utility container message. Is not a pure {@link TcpDiscoveryAbstractMessage}. */
2626
public class InetSocketAddressMessage extends InetAddressMessage {
2727
/** */
2828
@Order(2)
@@ -47,12 +47,12 @@ public InetSocketAddressMessage(InetAddress addr, int port) {
4747
this.port = port;
4848
}
4949

50-
/** @return port. */
50+
/** @return Port. */
5151
public int port() {
5252
return port;
5353
}
5454

55-
/** @param port port. */
55+
/** @param port Port. */
5656
public void port(int port) {
5757
this.port = port;
5858
}

modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/messages/TcpDiscoveryAuthFailedMessage.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
import org.apache.ignite.plugin.extensions.communication.Message;
2626

2727
/**
28-
* Message telling joining node that its authentication failed on coordinator.
28+
* Message telling joining node that its authentication failed.
2929
*/
3030
public class TcpDiscoveryAuthFailedMessage extends TcpDiscoveryAbstractMessage implements Message {
3131
/** */
3232
private static final long serialVersionUID = 0L;
3333

34-
/** Coordinator address. */
35-
@Order(value = 5, method = "addressMessage")
36-
private InetAddressMessage addr;
34+
/** Creator address. */
35+
@Order(value = 5, method = "creatorAddressMessage")
36+
private InetAddressMessage creatorAddrMsg;
3737

3838
/** Node id for which authentication was failed. */
3939
@Order(6)
@@ -48,13 +48,13 @@ public TcpDiscoveryAuthFailedMessage() {
4848
* Constructor.
4949
*
5050
* @param creatorNodeId Creator node ID.
51-
* @param addr Coordinator address.
51+
* @param creatorAddr Creator address.
5252
* @param targetNodeId Node for which authentication was failed.
5353
*/
54-
public TcpDiscoveryAuthFailedMessage(UUID creatorNodeId, InetAddress addr, UUID targetNodeId) {
54+
public TcpDiscoveryAuthFailedMessage(UUID creatorNodeId, InetAddress creatorAddr, UUID targetNodeId) {
5555
super(creatorNodeId);
5656

57-
this.addr = new InetAddressMessage(addr);
57+
this.creatorAddrMsg = new InetAddressMessage(creatorAddr);
5858
this.targetNodeId = targetNodeId;
5959
}
6060

@@ -68,19 +68,19 @@ public void targetNodeId(UUID targetNodeId) {
6868
this.targetNodeId = targetNodeId;
6969
}
7070

71-
/** @return Coordinator address. */
72-
public InetAddressMessage addressMessage() {
73-
return addr;
71+
/** @return Creator address message. */
72+
public InetAddressMessage creatorAddressMessage() {
73+
return creatorAddrMsg;
7474
}
7575

76-
/** @param addr Coordinator address. */
77-
public void addressMessage(InetAddressMessage addr) {
78-
this.addr = addr;
76+
/** @param addr Creator address message. */
77+
public void creatorAddressMessage(InetAddressMessage addr) {
78+
this.creatorAddrMsg = addr;
7979
}
8080

81-
/** @return Coordinator address. */
82-
public InetAddress address() {
83-
return addr.address();
81+
/** @return Creator address. */
82+
public InetAddress creatorAddress() {
83+
return creatorAddrMsg.address();
8484
}
8585

8686
/** {@inheritDoc} */

0 commit comments

Comments
 (0)