private void postJoin() { blacklistedAddresses.clear(); if (logger.isFinestEnabled()) { logger.finest( "PostJoin master: " + node.getMasterAddress() + ", isMaster: " + node.isMaster()); } if (node.getState() != NodeState.ACTIVE) { return; } if (tryCount.incrementAndGet() == JOIN_TRY_COUNT) { logger.warning("Join try count exceed limit, setting this node as master!"); node.setAsMaster(); } if (node.joined()) { if (!node.isMaster()) { ensureConnectionToAllMembers(); } if (clusterService.getSize() == 1) { logger.info('\n' + node.clusterService.membersString()); } } }
@Override public boolean isActive() { return node.getState() != NodeState.SHUT_DOWN; }