Package org.apache.jackrabbit.oak.spi.gc
Class LoggingGCMonitor
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.gc.LoggingGCMonitor
-
- All Implemented Interfaces:
GCMonitor
public class LoggingGCMonitor extends java.lang.Object implements GCMonitor
ThisGCMonitor
implementation logs all calls to itsinfo(String, Object...)
,warn(String, Object...)
,error(String, Exception)
andskipped(String, Object...)
methods at the respective levels using the logger instance passed to the constructor.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.gc.GCMonitor
GCMonitor.Empty
-
-
Constructor Summary
Constructors Constructor Description LoggingGCMonitor(Logger log)
New instance logging tolog
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleaned(long reclaimedSize, long currentSize)
The cleanup phase of the garbage collection process terminated successfully.void
compacted()
The compaction phase of the garbage collection process terminated successfully.void
error(java.lang.String message, java.lang.Exception exception)
An error caused the garbage collection process to terminate prematurely.void
info(java.lang.String message, java.lang.Object... arguments)
Informal notification on the progress of garbage collection.void
skipped(java.lang.String reason, java.lang.Object... arguments)
A garbage collection cycle is skipped for a specificreason
.void
updateStatus(java.lang.String status)
The garbage collection entered a new phase e.g.void
warn(java.lang.String message, java.lang.Object... arguments)
Warning about a condition that might have adverse effects on the overall garbage collection process but does not prevent the process from running.
-
-
-
Constructor Detail
-
LoggingGCMonitor
public LoggingGCMonitor(Logger log)
New instance logging tolog
- Parameters:
log
-
-
-
Method Detail
-
info
public void info(java.lang.String message, java.lang.Object... arguments)
Description copied from interface:GCMonitor
Informal notification on the progress of garbage collection.
-
warn
public void warn(java.lang.String message, java.lang.Object... arguments)
Description copied from interface:GCMonitor
Warning about a condition that might have adverse effects on the overall garbage collection process but does not prevent the process from running.
-
error
public void error(java.lang.String message, java.lang.Exception exception)
Description copied from interface:GCMonitor
An error caused the garbage collection process to terminate prematurely.
-
skipped
public void skipped(java.lang.String reason, java.lang.Object... arguments)
Description copied from interface:GCMonitor
A garbage collection cycle is skipped for a specificreason
.
-
compacted
public void compacted()
Description copied from interface:GCMonitor
The compaction phase of the garbage collection process terminated successfully.
-
cleaned
public void cleaned(long reclaimedSize, long currentSize)
Description copied from interface:GCMonitor
The cleanup phase of the garbage collection process terminated successfully.
-
updateStatus
public void updateStatus(java.lang.String status)
Description copied from interface:GCMonitor
The garbage collection entered a new phase e.g. idle, estimation, etc.- Specified by:
updateStatus
in interfaceGCMonitor
- Parameters:
status
- short summary of the GC phase
-
-