Package 

Class SampleRingBuffer


  • 
    public final class SampleRingBuffer
    
                        

    Thread-safe sliding window of BiosignalSample values. Evicts samples older than windowSec from the most recent sample on each append.

    • Method Summary

      Modifier and Type Method Description
      final Unit append(BiosignalSample sample) Append a sample and evict anything outside the window.
      final List<Pair<Long, Double>> asPairs() Returns (timestampMs, bpm) pairs matching the format computeMetrics() expects.
      final List<BiosignalSample> getAll() Returns all samples currently in the buffer (for biosignal_frame).
      final Integer count()
      final Boolean isEmpty()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait