Class CompositeIOMonitor
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.spi.monitor.CompositeIOMonitor
-
-
Constructor Summary
Constructors Constructor Description CompositeIOMonitor()Create a new emptyCompositeIOMonitorinstance.CompositeIOMonitor(@NotNull Iterable<? extends IOMonitor> ioMonitors)Create a newCompositeIOMonitorinstance delegating the passedioMonitors
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterSegmentRead(File file, long msb, long lsb, int length, long elapsed)Called after a segment is read from the file system.voidafterSegmentWrite(File file, long msb, long lsb, int length, long elapsed)Called after a segment is written to the file system.voidbeforeSegmentRead(File file, long msb, long lsb, int length)Called before a segment is read from the file system.voidbeforeSegmentWrite(File file, long msb, long lsb, int length)Called before a segment is written to the file system.@NotNull RegistrationregisterIOMonitor(@NotNull IOMonitor ioMonitor)Register aIOMonitorinstance to which thisCompositeIOMonitorwill delegate all its calls untilRegistration.unregister()is called on the returnRegistration.
-
-
-
Constructor Detail
-
CompositeIOMonitor
public CompositeIOMonitor(@NotNull @NotNull Iterable<? extends IOMonitor> ioMonitors)Create a newCompositeIOMonitorinstance delegating the passedioMonitors- Parameters:
ioMonitors-IOMonitorinstances to delegate to
-
CompositeIOMonitor
public CompositeIOMonitor()
Create a new emptyCompositeIOMonitorinstance.
-
-
Method Detail
-
registerIOMonitor
@NotNull public @NotNull Registration registerIOMonitor(@NotNull @NotNull IOMonitor ioMonitor)
Register aIOMonitorinstance to which thisCompositeIOMonitorwill delegate all its calls untilRegistration.unregister()is called on the returnRegistration.- Parameters:
ioMonitor-IOMonitorto delegate to- Returns:
- a
RegistrationforioMonitor.
-
beforeSegmentRead
public void beforeSegmentRead(File file, long msb, long lsb, int length)
Description copied from interface:IOMonitorCalled before a segment is read from the file system.- Specified by:
beforeSegmentReadin interfaceIOMonitor- 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.
-
afterSegmentRead
public void afterSegmentRead(File file, long msb, long lsb, int length, long elapsed)
Description copied from interface:IOMonitorCalled after a segment is read from the file system. This is called only in case of successful operations.- Specified by:
afterSegmentReadin interfaceIOMonitor- 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.
-
beforeSegmentWrite
public void beforeSegmentWrite(File file, long msb, long lsb, int length)
Description copied from interface:IOMonitorCalled before a segment is written to the file system.- Specified by:
beforeSegmentWritein interfaceIOMonitor- 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.
-
afterSegmentWrite
public void afterSegmentWrite(File file, long msb, long lsb, int length, long elapsed)
Description copied from interface:IOMonitorCalled after a segment is written to the file system. This is called only in case of successful operations.- Specified by:
afterSegmentWritein interfaceIOMonitor- 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.
-
-