InProcessChronicleSource source1 = new InProcessChronicleSource(chronicle1, 61111);
ChronicleTools.deleteOnExit(TMP + "/chronicle2");
Chronicle chronicle2 = new IndexedChronicle(TMP + "/chronicle2");
InProcessChronicleSource source2 = new InProcessChronicleSource(chronicle2, 62222);
InProcessChronicleSink sink2 = new InProcessChronicleSink(source2, "localhost", 61111);
ChronicleTools.deleteOnExit(TMP + "/chronicle3");
Chronicle chronicle3 = new IndexedChronicle(TMP + "/chronicle3");
InProcessChronicleSink sink3 = new InProcessChronicleSink(chronicle3, "localhost", 62222);
Excerpt excerpt1 = source1.createExcerpt();
Excerpt excerpt2 = sink2.createExcerpt();
Excerpt excerpt3 = sink3.createExcerpt();
for (int i = 1; i < 20; i++) {
excerpt1.startExcerpt(8);
excerpt1.writeLong(System.nanoTime());
excerpt1.finish();
while (excerpt2.size() < i)
excerpt2.nextIndex();
while (excerpt3.size() < i)
excerpt3.nextIndex();
}
sink3.close();
sink2.close();
source1.close();
}