/** * @param topic Message topic. * @return Whether or not listener was indeed removed. */ public boolean removeMessageListener(Object topic) { return removeMessageListener(topic, null); }
/** * @param topic Message topic. * @return Whether or not listener was indeed removed. */ public boolean removeMessageListener(GridTopic topic) { return removeMessageListener((Object)topic); }
/** * @param topic Listener's topic. * @param lsnr Listener to remove. * @return Whether or not the lsnr was removed. */ public boolean removeMessageListener(GridTopic topic, @Nullable GridMessageListener lsnr) { return removeMessageListener((Object)topic, lsnr); }
/** {@inheritDoc} */ @Override protected void onKernalStop0(boolean cancel) { cctx.gridIO().removeMessageListener(TOPIC_TX); }
/** {@inheritDoc} */ @Override public void onKernalStop0(boolean cancel) { busyLock.writeLock().lock(); try { if (msgLsnr != null) ctx.io().removeMessageListener(TOPIC_EVENT, msgLsnr); msgLsnr = null; lsnrs.clear(); stopped = true; } finally { busyLock.writeLock().unlock(); } }
/** {@inheritDoc} */ @Override protected void onKernalStop0(boolean cancel) { cctx.gridIO().removeMessageListener(TOPIC_CACHE); for (Object ordTopic : cacheHandlers.orderedHandlers.keySet()) cctx.gridIO().removeMessageListener(ordTopic); for (Object ordTopic : grpHandlers.orderedHandlers.keySet()) cctx.gridIO().removeMessageListener(ordTopic); writeLock(); try { stopping = true; } finally { rw.writeLock().unlock(); } }
/** * @param topic Topic to unsubscribe from. * @param p Message predicate. */ public void removeUserMessageListener(@Nullable Object topic, IgniteBiPredicate<UUID, ?> p) { try { removeMessageListener(TOPIC_COMM_USER, new GridUserMessageListener(topic, (IgniteBiPredicate<UUID, Object>)p)); } catch (IgniteCheckedException e) { throw new IgniteException(e); } }
/** * Attempts to destroys index and release all the resources. * We use this method instead of {@link #close(Session)} because that method * is used by H2 internally. * * @param rmv Flag remove. */ public void destroy(boolean rmv) { if (msgLsnr != null) kernalContext().io().removeMessageListener(msgTopic, msgLsnr); }
/** {@inheritDoc} */ @Override protected void stop0(boolean cancel) { if (srv) cctx.kernalContext().io().removeMessageListener(TOPIC_WAL, ioLsnr); }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { // Cancel update notification timer. if (updateNtfTimer != null) updateNtfTimer.cancel(); if (verChecker != null) verChecker.stop(); // Io manager can be null, if invoke stop before create io manager, for example // exception on start. if (ctx.io() != null) ctx.io().removeMessageListener(TOPIC_INTERNAL_DIAGNOSTIC); }
@Override public boolean removeMessageListener(GridMessageListener lsnr, String topic) { A.notNull(lsnr, "lsnr"); A.notNull(topic, "topic"); return ctx.io().removeMessageListener(topic, lsnr); }
/** * */ private void replaceWithStoppingMappingRequestListener(GridIoManager ioMgr, final int nodeIdToStop) { ioMgr.removeMessageListener(GridTopic.TOPIC_METADATA_REQ); ioMgr.addMessageListener(GridTopic.TOPIC_METADATA_REQ, new GridMessageListener() { @Override public void onMessage(UUID nodeId, Object msg, byte plc) { new Thread(new Runnable() { @Override public void run() { metadataReqsCounter.incrementAndGet(); stopGrid(nodeIdToStop, true); } }).start(); } }); }
/** {@inheritDoc} */ @Override protected void onKernalStop0(boolean cancel) { synchronized (genEcnKeyMux) { stopped = true; if (ioLsnr != null) ctx.io().removeMessageListener(TOPIC_GEN_ENC_KEY, ioLsnr); if (discoLsnr != null) ctx.event().removeDiscoveryEventListener(discoLsnr, EVT_NODE_LEFT, EVT_NODE_FAILED); cancelFutures("Kernal stopped."); } }
/** * Stops deployment communication. */ void stop() { if (log.isDebugEnabled()) log.debug("Stopping deployment communication."); busyLock.block(); ctx.io().removeMessageListener(TOPIC_CLASSLOAD, peerLsnr); }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { super.stop(cancel); ctx.io().removeMessageListener(TOPIC_SCHEMA, ioLsnr); if (idx != null) idx.stop(); U.closeQuiet(qryDetailMetricsEvictTask); }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { if (ctx.config().isDaemon()) return; ctx.io().removeMessageListener(TOPIC_CONTINUOUS); for (IgniteThread thread : bufCheckThreads.values()) { U.interrupt(thread); U.join(thread); } if (log.isDebugEnabled()) log.debug("Continuous processor stopped."); }
/** {@inheritDoc} */ @Override public void onBeforeJobResponseSent(GridJobWorker worker) { if (log.isDebugEnabled()) log.debug("Received onBeforeJobResponseSent() callback: " + worker); assert jobAlwaysActivate || !passiveJobs.containsKey(worker.getJobId()); if (worker.getSession().isFullSupport()) { // Unregister session request listener for this jobs. ctx.io().removeMessageListener(worker.getJobTopic()); } }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { if (!isEnabled) return; ctx.io().removeMessageListener(GridTopic.TOPIC_AUTH, ioLsnr); ctx.event().removeDiscoveryEventListener(discoLsnr, DISCO_EVT_TYPES); cancelFutures("Node stopped"); if (!cancel) exec.shutdown(); else exec.shutdownNow(); }
/** {@inheritDoc} */ @Override public void stop(boolean cancel) throws IgniteCheckedException { if (ctx.config().isDaemon()) return; GridIoManager comm = ctx.io(); if (comm != null) comm.removeMessageListener(TOPIC_CHECKPOINT, lsnr); stopSpi(); if (log.isDebugEnabled()) log.debug(stopInfo()); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { ((IgniteKernal)grid()).context().io(). removeMessageListener(GridTopic.TOPIC_COMM_USER.name()); }