Class MetricsIOMonitor
java.lang.Object
org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitorAdapter
org.apache.jackrabbit.oak.segment.file.MetricsIOMonitor
- All Implemented Interfaces:
IOMonitor
This
IOMonitor
implementations registers the following monitoring endpoints
with the Metrics library if available:
OAK_SEGMENT_SEGMENT_READ_BYTES
: a meter metrics for the number of bytes read from tar filesOAK_SEGMENT_SEGMENT_WRITE_BYTES
: a meter metrics for the number of bytes written to tar filesOAK_SEGMENT_SEGMENT_READ_TIME
: a timer metrics for the time spent reading from tar filesOAK_SEGMENT_SEGMENT_WRITE_TIME
: a timer metrics for the time spent writing to tar files
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterSegmentRead
(File file, long msb, long lsb, int length, long elapsed) Called after a segment is read from the file system.void
afterSegmentWrite
(File file, long msb, long lsb, int length, long elapsed) Called after a segment is written to the file system.Methods inherited from class org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitorAdapter
beforeSegmentRead, beforeSegmentWrite
-
Field Details
-
OAK_SEGMENT_SEGMENT_READ_BYTES
- See Also:
-
OAK_SEGMENT_SEGMENT_WRITE_BYTES
- See Also:
-
OAK_SEGMENT_SEGMENT_READ_TIME
- See Also:
-
OAK_SEGMENT_SEGMENT_WRITE_TIME
- See Also:
-
-
Constructor Details
-
MetricsIOMonitor
-
-
Method Details
-
afterSegmentRead
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 interfaceIOMonitor
- Overrides:
afterSegmentRead
in classIOMonitorAdapter
- 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
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 interfaceIOMonitor
- Overrides:
afterSegmentWrite
in classIOMonitorAdapter
- 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.
-