java.lang.Object
org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitorAdapter
org.apache.jackrabbit.oak.segment.remote.persistentcache.DiskCacheIOMonitor
All Implemented Interfaces:
IOMonitor

public class DiskCacheIOMonitor extends IOMonitorAdapter
This IOMonitor implementations registers the following monitoring endpoints with the Metrics library if available:
  • Field Details

    • OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_BYTES

      public static final String OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_BYTES
      See Also:
    • OAK_SEGMENT_CACHE_DISK_SEGMENT_WRITE_BYTES

      public static final String OAK_SEGMENT_CACHE_DISK_SEGMENT_WRITE_BYTES
      See Also:
    • OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_TIME

      public static final String OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_TIME
      See Also:
    • OAK_SEGMENT_CACHE_DISk_SEGMENT_WRITE_TIME

      public static final String OAK_SEGMENT_CACHE_DISk_SEGMENT_WRITE_TIME
      See Also:
    • OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CALCULATED

      public static final String OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CALCULATED
      See Also:
    • OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CHANGE

      public static final String OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CHANGE
      See Also:
  • Constructor Details

    • DiskCacheIOMonitor

      public DiskCacheIOMonitor(@NotNull @NotNull StatisticsProvider statisticsProvider)
  • Method Details

    • afterSegmentRead

      public void afterSegmentRead(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.
    • afterSegmentWrite

      public void afterSegmentWrite(File file, long msb, long lsb, int length, long elapsed)
      Description copied from interface: IOMonitor
      Called after a segment is written to the file system. This is called only in case of successful operations.
      Specified by:
      afterSegmentWrite in interface IOMonitor
      Overrides:
      afterSegmentWrite 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 write operation, in nanoseconds.
    • updateCacheSize

      public void updateCacheSize(long calculated, long change)