/** * Writes a NettyDataPack, reconnecting to the remote peer if necessary. * NOTE: The stateLock read lock *must* be acquired before calling this * method. * @param dataPack the data pack to write. * @return the Netty ChannelFuture for the write operation. * @throws IOException if an error occurs connecting to the remote peer. */ private ChannelFuture writeDataPack(NettyDataPack dataPack) throws IOException { return getChannel().write(dataPack); }
@Override public String getRemoteName() throws IOException { stateLock.readLock().lock(); try { return getChannel().getRemoteAddress().toString(); } finally { stateLock.readLock().unlock(); } }
getChannel(); } catch (Throwable e) {
/** * Writes a NettyDataPack, reconnecting to the remote peer if necessary. * NOTE: The stateLock read lock *must* be acquired before calling this * method. * @param dataPack the data pack to write. * @return the Netty ChannelFuture for the write operation. * @throws IOException if an error occurs connecting to the remote peer. */ private ChannelFuture writeDataPack(NettyDataPack dataPack) throws IOException { return getChannel().write(dataPack); }
@Override public String getRemoteName() throws IOException { stateLock.readLock().lock(); try { return getChannel().getRemoteAddress().toString(); } finally { stateLock.readLock().unlock(); } }
getChannel(); } catch (Throwable e) {