/** {@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 onStateChangeExchangeDone(StateChangeRequest req) { try { if (req.activeChanged()) { if (req.activate()) onFinalActivate(req); globalState.setTransitionResult(req.requestId(), req.activate()); } sendChangeGlobalStateResponse(req.requestId(), req.initiatorNodeId(), null); } catch (Exception ex) { Exception e = new IgniteCheckedException("Failed to perform final activation steps", ex); U.error(log, "Failed to perform final activation steps [nodeId=" + ctx.localNodeId() + ", client=" + ctx.clientNode() + ", topVer=" + req.topologyVersion() + "]", ex); sendChangeGlobalStateResponse(req.requestId(), req.initiatorNodeId(), e); } }
globalState.setTransitionResult(msg.requestId(), msg.activate());
/** {@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 public void onStateChangeExchangeDone(StateChangeRequest req) { try { if (req.activeChanged()) { if (req.activate()) onFinalActivate(req); globalState.setTransitionResult(req.requestId(), req.activate()); } sendChangeGlobalStateResponse(req.requestId(), req.initiatorNodeId(), null); } catch (Exception ex) { Exception e = new IgniteCheckedException("Failed to perform final activation steps", ex); U.error(log, "Failed to perform final activation steps [nodeId=" + ctx.localNodeId() + ", client=" + ctx.clientNode() + ", topVer=" + req.topologyVersion() + "]", ex); sendChangeGlobalStateResponse(req.requestId(), req.initiatorNodeId(), e); } }
globalState.setTransitionResult(msg.requestId(), msg.activate());