Class ThreadLocalRecorder

java.lang.Object
fr.bl.drit.flow.agent.ThreadLocalRecorder
All Implemented Interfaces:
Recorder, Closeable, AutoCloseable

public final class ThreadLocalRecorder extends Object implements Recorder
A recorder that orchestrates per-thread recorders.
  • Constructor Details

    • ThreadLocalRecorder

      public ThreadLocalRecorder(ThreadRecorderFactory factory, Path outputDir)
      Parameters:
      factory - Responsible for creating ThreadRecorders
      outputDir - Path to the output directory
  • Method Details

    • enter

      public void enter(long methodId) throws IOException
      Description copied from interface: Recorder
      Emit a method enter event with the given method ID.
      Specified by:
      enter in interface Recorder
      Parameters:
      methodId - The ID of the method to trace
      Throws:
      IOException - If an I/O error occurs when emitting the event.
    • exit

      public void exit() throws IOException
      Description copied from interface: Recorder
      Emit a method exit event.
      Specified by:
      exit in interface Recorder
      Throws:
      IOException - If an I/O error occurs when emitting the event.
    • close

      public void close() throws IOException
      Flush and close all per-thread streams at shutdown.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException