for (int i = 0; i < nSupersteps; i++) {
for (int j = 0; j < nCommunications; j++) {
String tPeer = peers[r.nextInt(peers.length)];
String tag = peerName + " to " + tPeer;
msg = new ByteMessage(Bytes.toBytes(tag), dummyData);
bspPeer.send(tPeer, msg);
}
bspPeer.sync();
ByteMessage received;
while ((received = (ByteMessage) bspPeer.getCurrentMessage()) != null) {
LOG.info(Bytes.toString(received.getTag()) + " : "
+ received.getData().length);
}
}
}