@Override
public void run() {
final NodeEngineImpl nodeEngine = (NodeEngineImpl) getNodeEngine();
Node node = nodeEngine.getNode();
Joiner joiner = node.getJoiner();
final ILogger logger = node.getLogger(getClass().getName());
if (joiner instanceof TcpIpJoiner) {
TcpIpJoiner tcpIpJoiner = (TcpIpJoiner) joiner;
final Address endpoint = getCallerAddress();
final Address masterAddress = node.getMasterAddress();
approvedAsMaster = !tcpIpJoiner.claimingMaster && !node.isMaster()
&& (masterAddress == null || masterAddress.equals(endpoint));
} else {
approvedAsMaster = false;
logger.warning("This node requires MulticastJoin strategy!");
}
if (logger.isFinestEnabled()) {
logger.finest("Sending '" + approvedAsMaster + "' for master claim of node: " + getCallerAddress());
}
}