/** {@inheritDoc} */ @Override @Nullable public IgniteInternalFuture<Boolean> onLocalJoin(DiscoCache discoCache) { final DiscoveryDataClusterState state = globalState; if (state.active()) checkLocalNodeInBaseline(state.baselineTopology()); if (state.transition()) { joinFut = new TransitionOnJoinWaitFuture(state, discoCache); return joinFut; } else if (!ctx.clientNode() && !ctx.isDaemon() && ctx.config().isAutoActivationEnabled() && !state.active() && isBaselineSatisfied(state.baselineTopology(), discoCache.serverNodes())) changeGlobalState0(true, state.baselineTopology(), false); return null; }
/** {@inheritDoc} */ @Override public void onStateFinishMessage(ChangeGlobalStateFinishMessage msg) { DiscoveryDataClusterState state = globalState; if (msg.requestId().equals(state.transitionRequestId())) { log.info("Received state change finish message: " + msg.clusterActive()); globalState = state.finish(msg.success()); afterStateChangeFinished(msg.id(), msg.success()); ctx.cache().onStateChangeFinish(msg); TransitionOnJoinWaitFuture joinFut = this.joinFut; if (joinFut != null) joinFut.onDone(false); GridFutureAdapter<Void> transitionFut = transitionFuts.remove(state.transitionRequestId()); if (transitionFut != null) { state.setTransitionResult(msg.requestId(), msg.clusterActive()); transitionFut.onDone(); } } else U.warn(log, "Received state finish message with unexpected ID: " + msg); }
/** {@inheritDoc} */ @Override public void onStateFinishMessage(ChangeGlobalStateFinishMessage msg) { DiscoveryDataClusterState state = globalState; if (msg.requestId().equals(state.transitionRequestId())) { log.info("Received state change finish message: " + msg.clusterActive()); globalState = globalState.finish(msg.success()); afterStateChangeFinished(msg.id(), msg.success()); ctx.cache().onStateChangeFinish(msg); TransitionOnJoinWaitFuture joinFut = this.joinFut; if (joinFut != null) joinFut.onDone(false); GridFutureAdapter<Void> transitionFut = transitionFuts.remove(state.transitionRequestId()); if (transitionFut != null) { state.setTransitionResult(msg.requestId(), msg.clusterActive()); transitionFut.onDone(); } } else U.warn(log, "Received state finish message with unexpected ID: " + msg); }
/** {@inheritDoc} */ @Override @Nullable public IgniteInternalFuture<Boolean> onLocalJoin(DiscoCache discoCache) { final DiscoveryDataClusterState state = globalState; if (state.active()) checkLocalNodeInBaseline(state.baselineTopology()); if (state.transition()) { joinFut = new TransitionOnJoinWaitFuture(state, discoCache); return joinFut; } else if (!ctx.clientNode() && !ctx.isDaemon() && ctx.config().isAutoActivationEnabled() && !state.active() && isBaselineSatisfied(state.baselineTopology(), discoCache.serverNodes())) changeGlobalState0(true, state.baselineTopology(), false); return null; }