/** * Write out header, param, and cell block if there is one. * @param dos Stream to write into * @param header to write * @param param to write * @param cellBlock to write * @return Total number of bytes written. * @throws IOException if write action fails */ public static int write(final OutputStream dos, final Message header, final Message param, final ByteBuffer cellBlock) throws IOException { // Must calculate total size and write that first so other side can read it all in in one // swoop. This is dictated by how the server is currently written. Server needs to change // if we are to be able to write without the length prefixing. int totalSize = IPCUtil.getTotalSizeWhenWrittenDelimited(header, param); if (cellBlock != null) { totalSize += cellBlock.remaining(); } return write(dos, header, param, cellBlock, totalSize); }
call.callStats.setRequestSizeBytes(write(this.out, requestHeader, call.param, cellBlock)); } catch (Throwable t) { if(LOG.isTraceEnabled()) {
/** * Write out header, param, and cell block if there is one. * @param dos Stream to write into * @param header to write * @param param to write * @param cellBlock to write * @return Total number of bytes written. * @throws IOException if write action fails */ public static int write(final OutputStream dos, final Message header, final Message param, final ByteBuffer cellBlock) throws IOException { // Must calculate total size and write that first so other side can read it all in in one // swoop. This is dictated by how the server is currently written. Server needs to change // if we are to be able to write without the length prefixing. int totalSize = IPCUtil.getTotalSizeWhenWrittenDelimited(header, param); if (cellBlock != null) { totalSize += cellBlock.remaining(); } return write(dos, header, param, cellBlock, totalSize); }
call.callStats.setRequestSizeBytes(write(this.out, requestHeader, call.param, cellBlock)); } catch (Throwable t) { if(LOG.isTraceEnabled()) {
/** * Write out header, param, and cell block if there is one. * @param dos Stream to write into * @param header to write * @param param to write * @param cellBlock to write * @return Total number of bytes written. * @throws IOException if write action fails */ public static int write(final OutputStream dos, final Message header, final Message param, final ByteBuffer cellBlock) throws IOException { // Must calculate total size and write that first so other side can read it all in in one // swoop. This is dictated by how the server is currently written. Server needs to change // if we are to be able to write without the length prefixing. int totalSize = IPCUtil.getTotalSizeWhenWrittenDelimited(header, param); if (cellBlock != null) { totalSize += cellBlock.remaining(); } return write(dos, header, param, cellBlock, totalSize); }
/** * Write out header, param, and cell block if there is one. * @param dos * @param header * @param param * @param cellBlock * @return Total number of bytes written. * @throws IOException */ public static int write(final OutputStream dos, final Message header, final Message param, final ByteBuffer cellBlock) throws IOException { // Must calculate total size and write that first so other side can read it all in in one // swoop. This is dictated by how the server is currently written. Server needs to change // if we are to be able to write without the length prefixing. int totalSize = IPCUtil.getTotalSizeWhenWrittenDelimited(header, param); if (cellBlock != null) totalSize += cellBlock.remaining(); return write(dos, header, param, cellBlock, totalSize); }
call.callStats.setRequestSizeBytes(write(this.out, requestHeader, call.param, cellBlock)); } catch (Throwable t) { if(LOG.isTraceEnabled()) {
call.callStats.setRequestSizeBytes(IPCUtil.write(this.out, header, call.param, cellBlock)); } catch (IOException e) {
call.callStats.setRequestSizeBytes(IPCUtil.write(out, rh, call.param, cellBlock));