Class IOTraceMonitor

    • Constructor Summary

      Constructors 
      Constructor Description
      IOTraceMonitor​(@NotNull IOTraceWriter traceWriter)
      Create a new instance writing to traceWriter additional context fields context.
      IOTraceMonitor​(@NotNull IOTraceWriter traceWriter, @Nullable java.lang.String contextSpec)
      Create a new instance writing to traceWriter with additional context fields.
    • Constructor Detail

      • IOTraceMonitor

        public IOTraceMonitor​(@NotNull
                              @NotNull IOTraceWriter traceWriter,
                              @Nullable
                              @Nullable java.lang.String contextSpec)
        Create a new instance writing to traceWriter with additional context fields.
        Parameters:
        traceWriter - the IOTraceWriter
        contextSpec - additional context fields. A comma separated string.
      • IOTraceMonitor

        public IOTraceMonitor​(@NotNull
                              @NotNull IOTraceWriter traceWriter)
        Create a new instance writing to traceWriter additional context fields context.
        Parameters:
        traceWriter - the IOTraceWriter
    • Method Detail

      • setContext

        public void setContext​(@NotNull
                               @NotNull java.util.List<java.lang.String> context)
        Set the current context.
        Parameters:
        context - a list of strings corresponding to the fields passed to the contextSpec argument in the constructor.
      • afterSegmentRead

        public void afterSegmentRead​(@NotNull
                                     @NotNull java.io.File file,
                                     long msb,
                                     long lsb,
                                     int length,
                                     long elapsed)
        Description copied from interface: IOMonitor
        Called after a segment is read from the file system. This is called only in case of successful operations.
        Specified by:
        afterSegmentRead in interface IOMonitor
        Overrides:
        afterSegmentRead in class IOMonitorAdapter
        Parameters:
        file - File containing the segment.
        msb - Most significant bits of the segment ID.
        lsb - Least significant bits of the segment ID.
        length - Size of the segment.
        elapsed - Time spent by the read operation, in nanoseconds.
      • flush

        public void flush()
        Specified by:
        flush in interface java.io.Flushable