private boolean dataToRead(long[] counts) { int msgIdx = 0; boolean data = false; while (PipeReader.tryReadFragment(input)) { if (PipeReader.isNewMessage(input)) { msgIdx = PipeReader.getMsgIdx(input); if (msgIdx<0) { PipeReader.releaseReadLock(input); requestShutdown(); break; } else { counts[msgIdx]++; data = true; } } totalBytes += (PipeReader.sizeOfFragment(input)*4) + PipeReader.bytesConsumedByFragment(input); //logger.info("reading new input total bytes :"+totalBytes); PipeReader.releaseReadLock(input); } return data; }