Search in sources :

Example 1 with VanillaMethodReader

use of net.openhft.chronicle.wire.VanillaMethodReader in project Chronicle-Queue by OpenHFT.

the class ChronicleHistoryReader method readChronicle.

public Map<String, Histogram> readChronicle() {
    final SingleChronicleQueue q = createQueue();
    final ExcerptTailer tailer = q.createTailer();
    final WireParselet parselet = parselet();
    final MethodReader mr = new VanillaMethodReader(tailer, true, parselet, null, parselet);
    MessageHistory.set(new VanillaMessageHistory());
    while (!Thread.currentThread().isInterrupted() && mr.readOne()) {
        ++counter;
        if (this.progress && counter % 1_000_000L == 0) {
            System.out.println("Progress: " + counter);
        }
    }
    return histos;
}
Also used : SingleChronicleQueue(net.openhft.chronicle.queue.impl.single.SingleChronicleQueue) WireParselet(net.openhft.chronicle.wire.WireParselet) VanillaMethodReader(net.openhft.chronicle.wire.VanillaMethodReader) VanillaMessageHistory(net.openhft.chronicle.wire.VanillaMessageHistory) MethodReader(net.openhft.chronicle.bytes.MethodReader) VanillaMethodReader(net.openhft.chronicle.wire.VanillaMethodReader) ExcerptTailer(net.openhft.chronicle.queue.ExcerptTailer)

Aggregations

MethodReader (net.openhft.chronicle.bytes.MethodReader)1 ExcerptTailer (net.openhft.chronicle.queue.ExcerptTailer)1 SingleChronicleQueue (net.openhft.chronicle.queue.impl.single.SingleChronicleQueue)1 VanillaMessageHistory (net.openhft.chronicle.wire.VanillaMessageHistory)1 VanillaMethodReader (net.openhft.chronicle.wire.VanillaMethodReader)1 WireParselet (net.openhft.chronicle.wire.WireParselet)1