/** * @param msg Message. * @return Cache or group descriptor. */ private Object descriptorForMessage(GridCacheMessage msg) { if (msg instanceof GridCacheIdMessage) return cctx.cache().cacheDescriptor(((GridCacheIdMessage)msg).cacheId()); else if (msg instanceof GridCacheGroupIdMessage) return cctx.cache().cacheGroupDescriptors().get(((GridCacheGroupIdMessage)msg).groupId()); return null; }
/** {@inheritDoc} */ @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackC) throws IgniteSpiException { if (((GridIoMessage)msg).message() instanceof GridCacheMessage) { int msgCacheId = ((GridCacheIdMessage)((GridIoMessage)msg).message()).cacheId(); if (filterCacheId == null || filterCacheId == msgCacheId) { AtomicInteger cntr = cntMap.get(((GridIoMessage)msg).message().getClass()); if (cntr != null) cntr.incrementAndGet(); } } super.sendMessage(node, msg, ackC); }
/** * @param msg Message. */ public void onMessageProcessed(GridCacheMessage msg) { // Reset thread local context. cctx.tm().resetContext(); GridCacheMvccManager mvcc = cctx.mvcc(); if (mvcc != null) mvcc.contextReset(); // Unwind eviction notifications. if (msg instanceof IgniteTxStateAware) { IgniteTxState txState = ((IgniteTxStateAware)msg).txState(); if (txState != null) txState.unwindEvicts(cctx); } else if (msg instanceof GridCacheIdMessage) { GridCacheContext ctx = cctx.cacheContext(((GridCacheIdMessage)msg).cacheId()); if (ctx != null) CU.unwindEvicts(ctx); } }
/** * @param msg Message. * @return Cache or group descriptor. */ private Object descriptorForMessage(GridCacheMessage msg) { if (msg instanceof GridCacheIdMessage) return cctx.cache().cacheDescriptor(((GridCacheIdMessage)msg).cacheId()); else if (msg instanceof GridCacheGroupIdMessage) return cctx.cache().cacheGroupDescriptors().get(((GridCacheGroupIdMessage)msg).groupId()); return null; }
/** * @param msg Message. */ public void onMessageProcessed(GridCacheMessage msg) { // Reset thread local context. cctx.tm().resetContext(); GridCacheMvccManager mvcc = cctx.mvcc(); if (mvcc != null) mvcc.contextReset(); // Unwind eviction notifications. if (msg instanceof IgniteTxStateAware) { IgniteTxState txState = ((IgniteTxStateAware)msg).txState(); if (txState != null) txState.unwindEvicts(cctx); } else if (msg instanceof GridCacheIdMessage) { GridCacheContext ctx = cctx.cacheContext(((GridCacheIdMessage)msg).cacheId()); if (ctx != null) CU.unwindEvicts(ctx); } }