public void start(Socket socket, int protocolVersion) { this.socket = socket; this.protocolVersion = protocolVersion; new Thread(this, name() + "-" + session.peer).start(); }
@Override public void start(Socket socket, int version, boolean initiator) throws IOException { try { socket.setSoTimeout(socketTimeout); } catch (SocketException e) { logger.warn("Could not set incoming socket timeout to {}", socketTimeout, e); } super.start(socket, version, initiator); }
protected void signalCloseDone() { if (!isClosed()) close(); closeFuture.get().set(null); // We can now close the socket if (incomingConnection != null) { //this will close the underlying socket and remove it //from active MessagingService connections (CASSANDRA-11854) incomingConnection.close(); } else { //this is an outgoing connection not registered in the MessagingService //so we can close the socket directly try { socket.close(); } catch (IOException e) { // Erroring out while closing shouldn't happen but is not really a big deal, so just log // it at DEBUG and ignore otherwise. logger.debug("Unexpected error while closing streaming connection", e); } } } }
protected void signalCloseDone() { if (!isClosed()) close(); closeFuture.get().set(null); // We can now close the socket if (incomingConnection != null) { //this will close the underlying socket and remove it //from active MessagingService connections (CASSANDRA-11854) incomingConnection.close(); } else { //this is an outgoing connection not registered in the MessagingService //so we can close the socket directly try { socket.close(); } catch (IOException e) { // Erroring out while closing shouldn't happen but is not really a big deal, so just log // it at DEBUG and ignore otherwise. logger.debug("Unexpected error while closing streaming connection", e); } } } }
protected void signalCloseDone() { if (!isClosed()) close(); closeFuture.get().set(null); // We can now close the socket if (incomingConnection != null) { //this will close the underlying socket and remove it //from active MessagingService connections (CASSANDRA-11854) incomingConnection.close(); } else { //this is an outgoing connection not registered in the MessagingService //so we can close the socket directly try { socket.close(); } catch (IOException e) { // Erroring out while closing shouldn't happen but is not really a big deal, so just log // it at DEBUG and ignore otherwise. logger.debug("Unexpected error while closing streaming connection", e); } } } }
@SuppressWarnings("resource") private void sendInitMessage() throws IOException { StreamInitMessage message = new StreamInitMessage( FBUtilities.getBroadcastAddress(), session.sessionIndex(), session.planId(), session.description(), !isOutgoingHandler, session.keepSSTableLevel(), session.isIncremental()); ByteBuffer messageBuf = message.createMessage(false, protocolVersion); DataOutputStreamPlus out = getWriteChannel(socket); out.write(messageBuf); out.flush(); }
@SuppressWarnings("resource") private void sendInitMessage() throws IOException { StreamInitMessage message = new StreamInitMessage( FBUtilities.getBroadcastAddress(), session.sessionIndex(), session.planId(), session.description(), !isOutgoingHandler, session.keepSSTableLevel(), session.isIncremental()); ByteBuffer messageBuf = message.createMessage(false, protocolVersion); DataOutputStreamPlus out = getWriteChannel(socket); out.write(messageBuf); out.flush(); }
@SuppressWarnings("resource") private void sendInitMessage() throws IOException { StreamInitMessage message = new StreamInitMessage( FBUtilities.getBroadcastAddress(), session.sessionIndex(), session.planId(), session.description(), !isOutgoingHandler, session.keepSSTableLevel(), session.isIncremental()); ByteBuffer messageBuf = message.createMessage(false, protocolVersion); DataOutputStreamPlus out = getWriteChannel(socket); out.write(messageBuf); out.flush(); }
@Override public void start(Socket socket, int version, boolean initiator) throws IOException { try { socket.setSoTimeout(socketTimeout); } catch (SocketException e) { logger.warn("Could not set incoming socket timeout to {}", socketTimeout, e); } super.start(socket, version, initiator); }
@Override public void start(Socket socket, int version, boolean initiator) throws IOException { try { socket.setSoTimeout(socketTimeout); } catch (SocketException e) { logger.warn("Could not set incoming socket timeout to {}", socketTimeout, e); } super.start(socket, version, initiator); }
public void start(IncomingStreamingConnection connection, int protocolVersion) { this.incomingConnection = connection; start(connection.socket, protocolVersion); }
public void sendInitMessage(Socket socket, boolean isForOutgoing) throws IOException { StreamInitMessage message = new StreamInitMessage( FBUtilities.getBroadcastAddress(), session.sessionIndex(), session.planId(), session.description(), isForOutgoing); ByteBuffer messageBuf = message.createMessage(false, protocolVersion); getWriteChannel(socket).write(messageBuf); }
public void start(Socket socket, int protocolVersion, boolean initiator) throws IOException { this.socket = socket; this.protocolVersion = protocolVersion; if (initiator) sendInitMessage(); new FastThreadLocalThread(this, name() + "-" + socket.getRemoteSocketAddress()).start(); }
public void start(IncomingStreamingConnection connection, int protocolVersion) throws IOException { this.incomingConnection = connection; start(connection.socket, protocolVersion, false); }
public void start(IncomingStreamingConnection connection, int protocolVersion) throws IOException { this.incomingConnection = connection; start(connection.socket, protocolVersion, false); }
public void start(Socket socket, int protocolVersion, boolean initiator) throws IOException { this.socket = socket; this.protocolVersion = protocolVersion; if (initiator) sendInitMessage(); new FastThreadLocalThread(this, name() + "-" + socket.getRemoteSocketAddress()).start(); }
public void start(Socket socket, int protocolVersion, boolean initiator) throws IOException { this.socket = socket; this.protocolVersion = protocolVersion; if (initiator) sendInitMessage(); new FastThreadLocalThread(this, name() + "-" + socket.getRemoteSocketAddress()).start(); }
public void start(IncomingStreamingConnection connection, int protocolVersion) throws IOException { this.incomingConnection = connection; start(connection.socket, protocolVersion, false); }