/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg, byte[] data, long timeout) throws IOException { if (!blockMsgs) super.writeToSocket(sock, msg, data, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { if (!blockMsgs) super.writeToSocket(sock, out, msg, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(TcpDiscoveryAbstractMessage msg, Socket sock, int res, long timeout) throws IOException { if (cntConnCheckMsg && msg instanceof TcpDiscoveryConnectionCheckMessage) connCheckStatusMsgCntReceived++; super.writeToSocket(msg, sock, res, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(TcpDiscoveryAbstractMessage msg, Socket sock, int res, long timeout) throws IOException { if (msg instanceof TcpDiscoveryJoinRequestMessage && failJoinReqRes.getAndDecrement() > 0) res = RES_WAIT; super.writeToSocket(msg, sock, res, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg, byte[] data, long timeout) throws IOException { if (blockAll || block && sock.getPort() == 47500) throw new SocketException("Test discovery exception"); super.writeToSocket(sock, msg, data, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { if (blockAll || block && sock.getPort() == 47500) throw new SocketException("Test discovery exception"); super.writeToSocket(sock, msg, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { checkSegmented((InetSocketAddress)sock.getRemoteSocketAddress(), timeout); super.writeToSocket(sock, out, msg, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket( Socket sock, TcpDiscoveryAbstractMessage msg, byte[] data, long timeout ) throws IOException { checkSegmented((InetSocketAddress)sock.getRemoteSocketAddress(), timeout); super.writeToSocket(sock, msg, data, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { if (!onMessage(sock, msg)) return; super.writeToSocket(sock, out, msg, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(TcpDiscoveryAbstractMessage msg, Socket sock, int res, long timeout) throws IOException { checkSegmented((InetSocketAddress)sock.getRemoteSocketAddress(), timeout); super.writeToSocket(msg, sock, res, timeout); } }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { if (spiCtx != null) apply(spiCtx.localNode(), msg); super.writeToSocket(sock, out, msg, timeout); } }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { assertNotFailedNode(sock); if (isDrop(msg)) return; super.writeToSocket(sock, msg, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { assertNotFailedNode(sock); if (isDrop(msg)) return; super.writeToSocket(sock, out, msg, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(TcpDiscoveryAbstractMessage msg, Socket sock, int res, long timeout) throws IOException { assertNotFailedNode(sock); if (isDrop(msg)) return; super.writeToSocket(msg, sock, res, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket( Socket sock, TcpDiscoveryAbstractMessage msg, byte[] data, long timeout ) throws IOException { if (spiCtx != null) apply(spiCtx.localNode(), msg); super.writeToSocket(sock, msg, data, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket( Socket sock, TcpDiscoveryAbstractMessage msg, byte[] data, long timeout ) throws IOException { if (spiCtx != null) apply(spiCtx.localNode(), msg); super.writeToSocket(sock, msg, data, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, TcpDiscoveryAbstractMessage msg, byte[] data, long timeout) throws IOException { assertNotFailedNode(sock); if (isDrop(msg)) return; super.writeToSocket(sock, msg, data, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(ClusterNode node, Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { assertNotFailedNode(sock); if (isDrop(msg)) return; super.writeToSocket(node, sock, out, msg, timeout); }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { boolean add = msgIds.add(msg.id()); if (checkDuplicates && !add && !(msg instanceof TcpDiscoveryMetricsUpdateMessage)) { log.error("Send duplicated message: " + msg); failed = true; } super.writeToSocket(sock, out, msg, timeout); } }
/** {@inheritDoc} */ @Override protected void writeToSocket(Socket sock, OutputStream out, TcpDiscoveryAbstractMessage msg, long timeout) throws IOException, IgniteCheckedException { waitFor(writeLock); if (!onMessage(sock, msg)) return; super.writeToSocket(sock, out, msg, timeout); if (afterWrite != null) afterWrite.apply(msg, sock); }