Class DiskCacheIOMonitor
- 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
ThisIOMonitor
implementations registers the following monitoring endpoints with the Metrics library if available:OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_BYTES
: a meter metrics for the number of bytes read from segment disk cacheOAK_SEGMENT_CACHE_DISK_SEGMENT_WRITE_BYTES
: a meter metrics for the number of bytes written to segment disk cacheOAK_SEGMENT_CACHE_DISK_SEGMENT_READ_TIME
: a timer metrics for the time spent reading from segment disk cacheOAK_SEGMENT_CACHE_DISk_SEGMENT_WRITE_TIME
: a timer metrics for the time spent writing to segment disk cacheOAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CALCULATED
: a histogram for the calculated segment disk cache sizeOAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CHANGE
: a histogram for the segment disk cache size change
-
-
Field Summary
Fields Modifier and Type Field Description static String
OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CALCULATED
static String
OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CHANGE
static String
OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_BYTES
static String
OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_TIME
static String
OAK_SEGMENT_CACHE_DISK_SEGMENT_WRITE_BYTES
static String
OAK_SEGMENT_CACHE_DISk_SEGMENT_WRITE_TIME
-
Constructor Summary
Constructors Constructor Description DiskCacheIOMonitor(@NotNull StatisticsProvider statisticsProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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.void
updateCacheSize(long calculated, long change)
-
Methods inherited from class org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitorAdapter
beforeSegmentRead, beforeSegmentWrite
-
-
-
-
Field Detail
-
OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_BYTES
public static final String OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_BYTES
- See Also:
- Constant Field Values
-
OAK_SEGMENT_CACHE_DISK_SEGMENT_WRITE_BYTES
public static final String OAK_SEGMENT_CACHE_DISK_SEGMENT_WRITE_BYTES
- See Also:
- Constant Field Values
-
OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_TIME
public static final String OAK_SEGMENT_CACHE_DISK_SEGMENT_READ_TIME
- See Also:
- Constant Field Values
-
OAK_SEGMENT_CACHE_DISk_SEGMENT_WRITE_TIME
public static final String OAK_SEGMENT_CACHE_DISk_SEGMENT_WRITE_TIME
- See Also:
- Constant Field Values
-
OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CALCULATED
public static final String OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CALCULATED
- See Also:
- Constant Field Values
-
OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CHANGE
public static final String OAK_SEGMENT_CACHE_DISK_CACHE_SIZE_CHANGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DiskCacheIOMonitor
public DiskCacheIOMonitor(@NotNull @NotNull StatisticsProvider statisticsProvider)
-
-
Method Detail
-
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 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
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 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.
-
updateCacheSize
public void updateCacheSize(long calculated, long change)
-
-