protected void onCommand(TransportPool pool, Object data) { try { DataByteArrayInputStream bais = new DataByteArrayInputStream( (Buffer) data); bais.readInt(); long correlation = bais.readVarLong(); pool.onDone(correlation); ResponseFuture response = requests.remove(correlation); if( response!=null ) { response.set(bais); } } catch (Exception e) { LOGGER.info("Error while reading response", e); } }
protected void onCommand(TransportPool pool, Object data) { try { DataByteArrayInputStream bais = new DataByteArrayInputStream( (Buffer) data); int size = bais.readInt(); long correlation = bais.readVarLong(); pool.onDone(correlation); ResponseFuture response = requests.remove(correlation); if( response!=null ) { response.set(bais); } } catch (Exception e) { LOGGER.info("Error while reading response", e); } }
final DataByteArrayInputStream bais = new DataByteArrayInputStream((Buffer) data); final int size = bais.readInt(); final long correlation = bais.readVarLong();
final DataByteArrayInputStream bais = new DataByteArrayInputStream((Buffer) data); final int size = bais.readInt(); final long correlation = bais.readVarLong();