/** * Get index of a system listener. * * @param topic Topic. * @return Index. */ private int systemListenerIndex(Object topic) { assert topic instanceof GridTopic; return ((GridTopic)topic).ordinal(); }
/** {@inheritDoc} */ @Override public int hashCode() { return topic.ordinal() + id1.hashCode() + id2 + (int)(id3 ^ (id3 >>> 32)); }
/** {@inheritDoc} */ @Override public int hashCode() { return topic.ordinal() + id1.hashCode(); }
/** {@inheritDoc} */ @Override public int hashCode() { return topic.ordinal() + id1.hashCode () + (int)(id2 ^ (id2 >>> 32)); }
/** {@inheritDoc} */ @Override public int hashCode() { return topic.ordinal() + id1.hashCode() + id2.hashCode() + id3 + (int)(id4 ^ (id4 >>> 32)); }
/** {@inheritDoc} */ @Override public int hashCode() { return topic.ordinal() + id1.hashCode() + id2.hashCode() + (int)(id3 ^ (id3 >>> 32)); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(topic.ordinal()); U.writeGridUuid(out, id1); out.writeLong(id2); }
/** {@inheritDoc} */ @Override public int hashCode() { return topic.ordinal() + id.hashCode(); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(topic.ordinal()); U.writeUuid(out, id1); out.writeInt(id2); out.writeLong(id3); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(topic.ordinal()); U.writeGridUuid(out, id); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(topic.ordinal()); U.writeUuid(out, id1); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(topic.ordinal()); U.writeUuid(out, id1); out.writeLong(id2); }
/** * @param node Destination node. * @param topic Topic to send the message to. * @param msg Message to send. * @param plc Type of processing. * @throws IgniteCheckedException Thrown in case of any errors. */ public void sendToGridTopic(ClusterNode node, GridTopic topic, Message msg, byte plc) throws IgniteCheckedException { send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null, false); }
/** {@inheritDoc} */ @Override public int hashCode() { return topic.ordinal() + id1.hashCode() + (int)(id2 ^ (id2 >>> 32)); }
/** {@inheritDoc} */ @Override public int hashCode() { return topic.ordinal() + id1.hashCode() + id2.hashCode(); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(topic.ordinal()); U.writeUuid(out, id1); U.writeUuid(out, id2); out.writeInt(id3); out.writeLong(id4); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(topic.ordinal()); U.writeUuid(out, id1); U.writeUuid(out, id2); out.writeLong(id3); }
/** {@inheritDoc} */ @Override public void writeExternal(ObjectOutput out) throws IOException { out.writeByte(topic.ordinal()); U.writeGridUuid(out, id1); U.writeUuid(out, id2); }
/** * */ private void replaceWithCountingMappingRequestListener(GridIoManager ioMgr) { GridMessageListener[] lsnrs = U.field(ioMgr, "sysLsnrs"); final GridMessageListener delegate = lsnrs[GridTopic.TOPIC_MAPPING_MARSH.ordinal()]; GridMessageListener wrapper = new GridMessageListener() { @Override public void onMessage(UUID nodeId, Object msg, byte plc) { mappingReqsCounter.incrementAndGet(); delegate.onMessage(nodeId, msg, plc); } }; lsnrs[GridTopic.TOPIC_MAPPING_MARSH.ordinal()] = wrapper; }
/** * @param nodeId Id of destination node. * @param topic Topic to send the message to. * @param msg Message to send. * @param plc Type of processing. * @throws IgniteCheckedException Thrown in case of any errors. */ public void sendToGridTopic(UUID nodeId, GridTopic topic, Message msg, byte plc) throws IgniteCheckedException { ClusterNode node = ctx.discovery().node(nodeId); if (node == null) throw new ClusterTopologyCheckedException("Failed to send message to node (has node left grid?): " + nodeId); send(node, topic, topic.ordinal(), msg, plc, false, 0, false, null, false); }