/** * @return {@code True} if local node in disconnected state. */ private boolean isLocalNodeDisconnected() { boolean disconnected = false; if (ignite instanceof IgniteKernal) disconnected = ((IgniteKernal)ignite).context().clientDisconnected(); return disconnected; }
/** * @return Non null exception if node is stopping or disconnected. */ @Nullable private IgniteCheckedException checkNodeState() { if (ctx.isStopping()) { return new IgniteCheckedException("Failed to execute dynamic cache change request, " + "node is stopping."); } else if (ctx.clientDisconnected()) { return new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(), "Failed to execute dynamic cache change request, client node disconnected."); } return null; }
/** * Removes query future from futures map. * * @param reqId Request id. * @param fut Query future. */ protected void addQueryFuture(long reqId, GridCacheDistributedQueryFuture<?, ?, ?> fut) { futs.put(reqId, fut); if (cctx.kernalContext().clientDisconnected()) { IgniteClientDisconnectedCheckedException err = new IgniteClientDisconnectedCheckedException( cctx.kernalContext().cluster().clientReconnectFuture(), "Query was cancelled, client node disconnected."); fut.onDone(err); } }
/** * @param fut Future. * @return {@code False} if future was forcibly completed with error. */ private boolean onFutureAdded(IgniteInternalFuture<?> fut) { if (stopping) { ((GridFutureAdapter)fut).onDone(stopError()); return false; } else if (cctx.kernalContext().clientDisconnected()) { ((GridFutureAdapter)fut).onDone(disconnectedError(null)); return false; } return true; }
@Override public void run() { assertTrue(node2.context().clientDisconnected()); final QueryIndex idx = index(IDX_NAME_1, field(FIELD_NAME_1_ESCAPED)); try { dynamicIndexCreate(node1, CACHE_NAME, TBL_NAME, idx, false, 0); } catch (Exception e) { throw new IgniteException(e); } } });
/** * Sends request to cluster proposing update for given metadata. * * @param metadata Metadata proposed for update. * @return Future to wait for update result on. */ GridFutureAdapter<MetadataUpdateResult> requestMetadataUpdate(BinaryMetadata metadata) { MetadataUpdateResultFuture resFut = new MetadataUpdateResultFuture(); if (log.isDebugEnabled()) log.debug("Requesting metadata update for " + metadata.typeId() + "; caller thread is blocked on future " + resFut); try { synchronized (this) { unlabeledFutures.add(resFut); if (!stopping) discoMgr.sendCustomEvent(new MetadataUpdateProposedMessage(metadata, ctx.localNodeId())); else resFut.onDone(MetadataUpdateResult.createUpdateDisabledResult()); } } catch (Exception e) { resFut.onDone(MetadataUpdateResult.createUpdateDisabledResult(), e); } if (ctx.clientDisconnected()) onDisconnected(); return resFut; }
if (!ctx.clientDisconnected()) { if (dep.annotation(taskCls, ComputeTaskMapAsync.class) != null) { try {
"node is stopping."); else if (ctx.clientDisconnected()) { err = new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(), "Failed to execute dynamic cache change request, client node disconnected.");
if (ctx.clientDisconnected()) { IgniteClientDisconnectedCheckedException err = new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(),
if (ctx.isStopping() || ctx.clientDisconnected()) return;
cctx.io().removeHandler(false, 0, GridDhtPartitionsSingleRequest.class); stopErr = cctx.kernalContext().clientDisconnected() ? new IgniteClientDisconnectedCheckedException(cctx.kernalContext().cluster().clientReconnectFuture(), "Client node disconnected: " + cctx.igniteInstanceName()) :
if (!isLocDaemon && !ctx.clientDisconnected()) { ctx.cache().context().coordinators().onLocalJoin(discoEvt, discoCache); if (type == EVT_CLIENT_NODE_DISCONNECTED || type == EVT_NODE_SEGMENTED || !ctx.clientDisconnected()) discoWrk.addEvent(type, nextTopVer, node, discoCache, topSnapshot, customMsg);
cancel.checkCancelled(); if (ctx.clientDisconnected()) { throw new CacheException("Query was cancelled, client node disconnected.", new IgniteClientDisconnectedException(ctx.cluster().clientReconnectFuture(),
if (ctx.clientDisconnected()) return new GridFinishedFuture<>(new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(), "Failed to get affinity mapping, client disconnected."));
/** * @return {@code True} if local node in disconnected state. */ private boolean isLocalNodeDisconnected() { boolean disconnected = false; if (ignite instanceof IgniteKernal) disconnected = ((IgniteKernal)ignite).context().clientDisconnected(); return disconnected; }
/** * @return Non null exception if node is stopping or disconnected. */ @Nullable private IgniteCheckedException checkNodeState() { if (ctx.isStopping()) { return new IgniteCheckedException("Failed to execute dynamic cache change request, " + "node is stopping."); } else if (ctx.clientDisconnected()) { return new IgniteClientDisconnectedCheckedException(ctx.cluster().clientReconnectFuture(), "Failed to execute dynamic cache change request, client node disconnected."); } return null; }
/** * Removes query future from futures map. * * @param reqId Request id. * @param fut Query future. */ protected void addQueryFuture(long reqId, GridCacheDistributedQueryFuture<?, ?, ?> fut) { futs.put(reqId, fut); if (cctx.kernalContext().clientDisconnected()) { IgniteClientDisconnectedCheckedException err = new IgniteClientDisconnectedCheckedException( cctx.kernalContext().cluster().clientReconnectFuture(), "Query was cancelled, client node disconnected."); fut.onDone(err); } }
/** * @param fut Future. * @return {@code False} if future was forcibly completed with error. */ private boolean onFutureAdded(IgniteInternalFuture<?> fut) { if (stopping) { ((GridFutureAdapter)fut).onDone(stopError()); return false; } else if (cctx.kernalContext().clientDisconnected()) { ((GridFutureAdapter)fut).onDone(disconnectedError(null)); return false; } return true; }
/** * Sends request to cluster proposing update for given metadata. * * @param metadata Metadata proposed for update. * @return Future to wait for update result on. */ GridFutureAdapter<MetadataUpdateResult> requestMetadataUpdate(BinaryMetadata metadata) { MetadataUpdateResultFuture resFut = new MetadataUpdateResultFuture(); if (log.isDebugEnabled()) log.debug("Requesting metadata update for " + metadata.typeId() + "; caller thread is blocked on future " + resFut); try { synchronized (this) { unlabeledFutures.add(resFut); if (!stopping) discoMgr.sendCustomEvent(new MetadataUpdateProposedMessage(metadata, ctx.localNodeId())); else resFut.onDone(MetadataUpdateResult.createUpdateDisabledResult()); } } catch (Exception e) { resFut.onDone(MetadataUpdateResult.createUpdateDisabledResult(), e); } if (ctx.clientDisconnected()) onDisconnected(); return resFut; }
cctx.io().removeHandler(false, 0, GridDhtPartitionsSingleRequest.class); stopErr = cctx.kernalContext().clientDisconnected() ? new IgniteClientDisconnectedCheckedException(cctx.kernalContext().cluster().clientReconnectFuture(), "Client node disconnected: " + cctx.igniteInstanceName()) :