Class DelegatingGCMonitor

java.lang.Object
org.apache.jackrabbit.oak.spi.gc.DelegatingGCMonitor
All Implemented Interfaces:
GCMonitor

public class DelegatingGCMonitor extends Object implements GCMonitor
This GCMonitor implementation simply delegates all its call to registered monitors.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.gc.GCMonitor

    GCMonitor.Empty
  • Field Summary

    Fields inherited from interface org.apache.jackrabbit.oak.spi.gc.GCMonitor

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
    New instance without any delegate.
    DelegatingGCMonitor(@NotNull Collection<? extends GCMonitor> gcMonitors)
    New instance with an initial set of delegates (which cannot be unregistered).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cleaned(long reclaimedSize, long currentSize)
    The cleanup phase of the garbage collection process terminated successfully.
    void
    The compaction phase of the garbage collection process terminated successfully.
    void
    error(String message, Exception exception)
    An error caused the garbage collection process to terminate prematurely.
    void
    info(String message, Object... arguments)
    Informal notification on the progress of garbage collection.
    registerGCMonitor(@NotNull GCMonitor gcMonitor)
    Register a GCMonitor.
    void
    skipped(String reason, Object... arguments)
    A garbage collection cycle is skipped for a specific reason.
    void
    The garbage collection entered a new phase e.g.
    void
    warn(String message, 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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DelegatingGCMonitor

      public DelegatingGCMonitor(@NotNull @NotNull Collection<? extends GCMonitor> gcMonitors)
      New instance with an initial set of delegates (which cannot be unregistered).
      Parameters:
      gcMonitors -
    • DelegatingGCMonitor

      public DelegatingGCMonitor()
      New instance without any delegate.
  • Method Details

    • registerGCMonitor

      public Registration registerGCMonitor(@NotNull @NotNull GCMonitor gcMonitor)
      Register a GCMonitor.
      Parameters:
      gcMonitor -
      Returns:
      a Registration instance, which removes the registered GCMonitor instance when called.
    • info

      public void info(String message, Object... arguments)
      Description copied from interface: GCMonitor
      Informal notification on the progress of garbage collection.
      Specified by:
      info in interface GCMonitor
      Parameters:
      message - The message with {} place holders for the arguments
      arguments -
    • warn

      public void warn(String message, 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.
      Specified by:
      warn in interface GCMonitor
      Parameters:
      message - The message with {} place holders for the arguments
      arguments -
    • error

      public void error(String message, Exception exception)
      Description copied from interface: GCMonitor
      An error caused the garbage collection process to terminate prematurely.
      Specified by:
      error in interface GCMonitor
      Parameters:
      message -
      exception -
    • skipped

      public void skipped(String reason, Object... arguments)
      Description copied from interface: GCMonitor
      A garbage collection cycle is skipped for a specific reason.
      Specified by:
      skipped in interface GCMonitor
      Parameters:
      reason - The reason with {} place holders for the arguments
      arguments -
    • compacted

      public void compacted()
      Description copied from interface: GCMonitor
      The compaction phase of the garbage collection process terminated successfully.
      Specified by:
      compacted in interface GCMonitor
    • cleaned

      public void cleaned(long reclaimedSize, long currentSize)
      Description copied from interface: GCMonitor
      The cleanup phase of the garbage collection process terminated successfully.
      Specified by:
      cleaned in interface GCMonitor
      Parameters:
      reclaimedSize - number of bytes reclaimed
      currentSize - number of bytes after garbage collection
    • updateStatus

      public void updateStatus(String status)
      Description copied from interface: GCMonitor
      The garbage collection entered a new phase e.g. idle, estimation, etc.
      Specified by:
      updateStatus in interface GCMonitor
      Parameters:
      status - short summary of the GC phase