Package com.newrelic.jfr.daemon
Class RecordedEventBuffer
- java.lang.Object
-
- com.newrelic.jfr.daemon.RecordedEventBuffer
-
public class RecordedEventBuffer extends java.lang.ObjectThis class adds RecordedEvents from a RecordingFile to a queue. It statefully keeps track of the time of the event seen from the previous file and uses this to prevent queueing duplicates.
-
-
Constructor Summary
Constructors Constructor Description RecordedEventBuffer(java.util.concurrent.BlockingQueue<jdk.jfr.consumer.RecordedEvent> queue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbufferEvents(java.nio.file.Path dumpFile, jdk.jfr.consumer.RecordingFile file)Buffer the events of thefileto thequeue.java.util.stream.Stream<jdk.jfr.consumer.RecordedEvent>drainToStream()java.time.Instantend()java.time.Instantstart()
-
-
-
Method Detail
-
bufferEvents
public void bufferEvents(java.nio.file.Path dumpFile, jdk.jfr.consumer.RecordingFile file) throws java.io.IOExceptionBuffer the events of thefileto thequeue. Iterate through the events of the JFRfile, filtering events older than the last seen watermark, and add to the queue until there are no more events or the queue is full.- Parameters:
dumpFile- the path of thefilefile- the JFR file- Throws:
java.io.IOException- if an error occurs reading the file
-
drainToStream
public java.util.stream.Stream<jdk.jfr.consumer.RecordedEvent> drainToStream()
-
start
public java.time.Instant start()
-
end
public java.time.Instant end()
-
-