Source:
public boolean addedData(boolean checkIfListenerHaveDataToSendOnly) { if (!checkIfListenerHaveDataToSendOnly && isReady()) { if (caughtup) { try { if (partitions.isEmpty()) { while (ready && iterator.hasNext()) { SerializedData data = iterator.next(); switch (data.buffer[data.dataOffset]) { case MessageType.PAYLOAD_VALUE: ready = policy.distribute(physicalNodes, data); break; case MessageType.NO_MESSAGE_VALUE: case MessageType.NO_MESSAGE_ODD_VALUE: break; case MessageType.RESET_WINDOW_VALUE: final int length = data.length - data.dataOffset + data.offset; Tuple resetWindow = Tuple.getTuple(data.buffer, data.dataOffset, length); baseSeconds = (long)resetWindow.getBaseSeconds() << 32; ready = GiveAll.getInstance().distribute(physicalNodes, data); break; default: ready = GiveAll.getInstance().distribute(physicalNodes, data); break; } } } else { while (ready && iterator.hasNext()) { SerializedData data = iterator.next(); final int length = data.length - data.dataOffset + data.offset; switch (data.buffer[data.dataOffset]) { case MessageType.PAYLOAD_VALUE: Tuple tuple = Tuple.getTuple(data.buffer, data.dataOffset, length); int value = tuple.getPartition(); for (BitVector bv : partitions) { if (bv.matches(value)) { ready = policy.distribute(physicalNodes, data); break; } } break; case MessageType.NO_MESSAGE_VALUE: case MessageType.NO_MESSAGE_ODD_VALUE: break; case MessageType.RESET_WINDOW_VALUE: tuple = Tuple.getTuple(data.buffer, data.dataOffset, length); baseSeconds = (long)tuple.getBaseSeconds() << 32; ready = GiveAll.getInstance().distribute(physicalNodes, data); break; default: ready = GiveAll.getInstance().distribute(physicalNodes, data); break; } } } } catch (InterruptedException ie) { throw new RuntimeException(ie); } } else { catchUp(); } } return iterator.hasNext(); }

Target:
public boolean addedData(boolean checkIfListenerHaveDataToSendOnly) { if (!checkIfListenerHaveDataToSendOnly && isReady()) { if (caughtup) { try { if (partitions.isEmpty()) { while (ready && iterator.hasNext()) { SerializedData data = iterator.next(); switch (data.buffer[data.dataOffset]) { case MessageType.PAYLOAD_VALUE: ready = policy.distribute(physicalNodes, data); break; case MessageType.NO_MESSAGE_VALUE: case MessageType.NO_MESSAGE_ODD_VALUE: break; case MessageType.RESET_WINDOW_VALUE: final int length = data.length - data.dataOffset + data.offset; Tuple resetWindow = Tuple.getTuple(data.buffer, data.dataOffset, length); baseSeconds = (long)resetWindow.getBaseSeconds() << 32; ready = GiveAll.getInstance().distribute(physicalNodes, data); break; default: ready = GiveAll.getInstance().distribute(physicalNodes, data); break; } } } else { while (ready && iterator.hasNext()) { SerializedData data = iterator.next(); final int length = data.length - data.dataOffset + data.offset; switch (data.buffer[data.dataOffset]) { case MessageType.PAYLOAD_VALUE: Tuple tuple = Tuple.getTuple(data.buffer, data.dataOffset, length); int value = tuple.getPartition(); for (BitVector bv : partitions) { if (bv.matches(value)) { ready = policy.distribute(physicalNodes, data); break; } } break; case MessageType.NO_MESSAGE_VALUE: case MessageType.NO_MESSAGE_ODD_VALUE: break; case MessageType.RESET_WINDOW_VALUE: tuple = Tuple.getTuple(data.buffer, data.dataOffset, length); baseSeconds = (long)tuple.getBaseSeconds() << 32; ready = GiveAll.getInstance().distribute(physicalNodes, data); break; default: ready = GiveAll.getInstance().distribute(physicalNodes, data); break; } } } } catch (Exception e) { logger.error("Disconnecting {}", this, e); boot(); } } else { catchUp(); } } return iterator.hasNext(); }