/** {@inheritDoc} */ @Override public void onKernalStop(boolean cancel) { GridChangeGlobalStateFuture fut = this.stateChangeFut.get(); if (fut != null) fut.onDone(new IgniteCheckedException("Failed to wait for cluster state change, node is stopping.")); super.onKernalStop(cancel); }
/** * */ private void onAllReceived() { IgniteCheckedException e = new IgniteCheckedException(); boolean fail = false; for (Map.Entry<UUID, GridChangeGlobalStateMessageResponse> entry : responses.entrySet()) { GridChangeGlobalStateMessageResponse r = entry.getValue(); if (r.getError() != null) { fail = true; e.addSuppressed(r.getError()); } } if (fail) onDone(e); else onDone(); }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { super.stop(cancel); if (sharedCtx != null) sharedCtx.io().removeHandler(false, 0, GridChangeGlobalStateMessageResponse.class); ctx.event().removeLocalEventListener(lsr, EVT_NODE_LEFT, EVT_NODE_FAILED); IgniteCheckedException stopErr = new IgniteCheckedException( "Node is stopping: " + ctx.igniteInstanceName()); GridChangeGlobalStateFuture f = stateChangeFut.get(); if (f != null) f.onDone(stopErr); }
U.error(log, "Failed to read stored cache configurations: " + e, e); startedFut.onDone(e); startedFut.onDone(new IgniteCheckedException("Failed to execute " + prettyStr(activate) + " request, " + "node is stopping.")); U.error(log, "Failed to send global state change request: " + activate, e); startedFut.onDone(e);
e.addSuppressed(entry.getValue()); fut.onDone(e);
/** * */ private void onAllReceived() { IgniteCheckedException e = new IgniteCheckedException(); boolean fail = false; for (Map.Entry<UUID, GridChangeGlobalStateMessageResponse> entry : responses.entrySet()) { GridChangeGlobalStateMessageResponse r = entry.getValue(); if (r.getError() != null) { fail = true; e.addSuppressed(r.getError()); } } if (fail) onDone(e); else onDone(); }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { super.stop(cancel); if (sharedCtx != null) sharedCtx.io().removeHandler(false, 0, GridChangeGlobalStateMessageResponse.class); ctx.event().removeLocalEventListener(lsr, EVT_NODE_LEFT, EVT_NODE_FAILED); IgniteCheckedException stopErr = new IgniteCheckedException( "Node is stopping: " + ctx.igniteInstanceName()); GridChangeGlobalStateFuture f = stateChangeFut.get(); if (f != null) f.onDone(stopErr); }
/** {@inheritDoc} */ @Override public void onKernalStop(boolean cancel) { GridChangeGlobalStateFuture fut = this.stateChangeFut.get(); if (fut != null) fut.onDone(new IgniteCheckedException("Failed to wait for cluster state change, node is stopping.")); super.onKernalStop(cancel); }
U.error(log, "Failed to read stored cache configurations: " + e, e); startedFut.onDone(e); String errMsg = "Failed to execute " + prettyStr(activate) + " request, node is stopping."; startedFut.onDone(new IgniteCheckedException(errMsg)); U.error(log, "Failed to send global state change request: " + activate, e); startedFut.onDone(e);
e.addSuppressed(entry.getValue()); fut.onDone(e);