test_class.file: oak-segment-tar/src/test/java/org/apache/jackrabbit/oak/segment/tool/iotrace/IOTraceMonitorTest.java
test_class.identifier: IOTraceMonitorTest
test_case.body: @Test
      public void testFlush() {
          TraceWriterAssertion traceWriter = new TraceWriterAssertion();
          IOTraceMonitor ioTraceMonitor = new IOTraceMonitor(traceWriter, "foo,bar");
          traceWriter.assertNotFlushed();
          ioTraceMonitor.flush();
          traceWriter.assertFlushed();
      }
test_case.class_method_signature: IOTraceMonitorTest.testFlush()
test_case.full_signature: @Test public void testFlush()
test_case.identifier: testFlush
test_case.invocations: assertNotFlushed flush assertFlushed
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFlush()
focal_class.declarator: context =
              new AtomicReference<>(ImmutableList.of())
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final AtomicReference<List<String>> context =
              new AtomicReference<>(ImmutableList.of());
focal_class.type: AtomicReference<List<String>>
focal_class.var_name: context
focal_class.declarator: traceWriter
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final IOTraceWriter traceWriter;
focal_class.type: IOTraceWriter
focal_class.var_name: traceWriter
focal_class.declarator: ioLock = new ReentrantLock()
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final Lock ioLock = new ReentrantLock();
focal_class.type: Lock
focal_class.var_name: ioLock
focal_class.declarator: ioEvents = newConcurrentLinkedQueue()
focal_class.modifier: @NotNull
      private final
focal_class.original_string: @NotNull
      private final ConcurrentLinkedQueue<IOEvent> ioEvents = newConcurrentLinkedQueue();
focal_class.type: ConcurrentLinkedQueue<IOEvent>
focal_class.var_name: ioEvents
focal_class.file: oak-segment-tar/src/main/java/org/apache/jackrabbit/oak/segment/tool/iotrace/IOTraceMonitor.java
focal_class.identifier: IOTraceMonitor
focal_class.interfaces: implements Flushable
focal_class.class_method_signature: IOTraceMonitor.IOTraceMonitor(@NotNull IOTraceWriter traceWriter, @Nullable String contextSpec)
focal_class.full_signature: public  IOTraceMonitor(@NotNull IOTraceWriter traceWriter, @Nullable String contextSpec)
focal_class.identifier: IOTraceMonitor
focal_class.modifiers: public
focal_class.parameters: (@NotNull IOTraceWriter traceWriter, @Nullable String contextSpec)
focal_class.signature:  IOTraceMonitor(@NotNull IOTraceWriter traceWriter, @Nullable String contextSpec)
focal_class.class_method_signature: IOTraceMonitor.IOTraceMonitor(@NotNull IOTraceWriter traceWriter)
focal_class.full_signature: public  IOTraceMonitor(@NotNull IOTraceWriter traceWriter)
focal_class.identifier: IOTraceMonitor
focal_class.modifiers: public
focal_class.parameters: (@NotNull IOTraceWriter traceWriter)
focal_class.signature:  IOTraceMonitor(@NotNull IOTraceWriter traceWriter)
focal_class.class_method_signature: IOTraceMonitor.setContext(@NotNull List<String> context)
focal_class.full_signature: public void setContext(@NotNull List<String> context)
focal_class.identifier: setContext
focal_class.modifiers: public
focal_class.parameters: (@NotNull List<String> context)
focal_class.return: void
focal_class.signature: void setContext(@NotNull List<String> context)
focal_class.class_method_signature: IOTraceMonitor.afterSegmentRead(@NotNull File file, long msb, long lsb, int length,
                                   long elapsed)
focal_class.full_signature: @Override public void afterSegmentRead(@NotNull File file, long msb, long lsb, int length,
                                   long elapsed)
focal_class.identifier: afterSegmentRead
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull File file, long msb, long lsb, int length,
                                   long elapsed)
focal_class.return: void
focal_class.signature: void afterSegmentRead(@NotNull File file, long msb, long lsb, int length,
                                   long elapsed)
focal_class.class_method_signature: IOTraceMonitor.flush()
focal_class.full_signature: @Override public void flush()
focal_class.identifier: flush
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void flush()
focal_class.superclass: extends IOMonitorAdapter
focal_method.body: @Override
      public void flush() {
          ioLock.lock();
          try {
              while (!ioEvents.isEmpty()) {
                  traceWriter.writeEntry(Objects.toString(ioEvents.poll()));
              }
              traceWriter.flush();
          } finally {
              ioLock.unlock();
          }
      }
focal_method.class_method_signature: IOTraceMonitor.flush()
focal_method.full_signature: @Override public void flush()
focal_method.identifier: flush
focal_method.invocations: lock isEmpty writeEntry toString poll flush unlock
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void flush()