Class TickCapture

java.lang.Object
com.quantfinlib.data.TickCapture
All Implemented Interfaces:
TickListener, AutoCloseable

public final class TickCapture extends Object implements TickListener, AutoCloseable
Records every tick flowing through an HftMarketDataBus into a QFLT tick file: attach once, trade/observe as usual, close to flush — then replay the session deterministically with TickFileReader.

Writing happens on the bus consumer thread through a 1 MB buffer (~28 bytes/tick), which is comfortably below the bus's throughput; a disk error surfaces as UncheckedIOException on that thread. Latency note: a page-cache writeback or disk hiccup therefore stalls the consumer thread. Fine for capture-only or research sessions; when the same bus is TRADING, use AsyncTickCapture, which moves the file I/O to a dedicated writer thread behind a ring.