public String getQuorumAddress() { return follower.sock.toString(); }
@Override public String toString() { return sock.toString(); }
public String getQuorumAddress() { return follower.sock.toString(); }
public String getQuorumAddress() { return observer.getSocket().toString(); }
public String getQuorumAddress() { return observer.getSocket().toString(); }
/** * See {@link Socket#toString()}. Calling this method does not trigger mode detection. */ @Override public String toString() { return "UnifiedSocket[mode=" + mode.toString() + "socket=" + getSocketAllowUnknownMode().toString() + "]"; }
sChannel.configureBlocking(false); final SelectionKey socketChannelKey = sChannel.register(socketChannelSelector, SelectionKey.OP_READ); final String readerId = sChannel.socket().toString(); reader = new SocketChannelReader(readerId, socketChannelKey, emptyBuffers, factory); final ScheduledFuture<?> readerFuture = executor.scheduleWithFixedDelay(reader, 10L,
Socket sock = serverSocket.accept(); if (sock != null) { Log.debug("Connect " + sock.toString());
return delegate.toString();
return delegate.toString();
return delegate.toString();
@Override public String toString() { return socket.toString(); }
@Override public String toString() { return this.socket.toString(); }
@Override public String toString() { return socket.toString(); }
@Override public String toString() { return sock.toString(); }
protected void read(final SelectionKey key) throws IOException { final Link link = (Link)key.attachment(); try { final SocketChannel socketChannel = (SocketChannel)key.channel(); if (s_logger.isTraceEnabled()) { s_logger.trace("Reading from: " + socketChannel.socket().toString()); } final byte[] data = link.read(socketChannel); if (data == null) { if (s_logger.isTraceEnabled()) { s_logger.trace("Packet is incomplete. Waiting for more."); } return; } final Task task = _factory.create(Task.Type.DATA, link, data); try { _executor.submit(task); } catch (final Exception e) { s_logger.warn("Exception occurred when submitting the task", e); } } catch (final Exception e) { logDebug(e, key, 1); terminate(key); } }
public void initialize(Socket socket) throws IOException, NotInitializedException { logger.debug("Initialising TCPTransportClient for a socket on [{}]", socket); socketDescription = socket.toString(); socketChannel = socket.getChannel(); //PCB added logging socketChannel.configureBlocking(BLOCKING_IO); destAddress = new InetSocketAddress(socket.getInetAddress(), socket.getPort()); }
public void onConnectionIsAccepted(final SocketChannel socketChannel, final Selector selector) throws IOException { this.log.info("A connection is accepted: " + socketChannel.socket().toString()); final PipedDeserializer deserializer = new PipedDeserializerImpl(socketChannel, this.messageReceiver, this.logger, this.log); this.deserializationTasks.put(socketChannel, deserializer); socketChannel.register(selector, SelectionKey.OP_READ, new InputSocketChannelContext( socketChannel, deserializer, this)); }