Class MonitorTarget

java.lang.Object
org.codelibs.fess.timer.MonitorTarget
All Implemented Interfaces:
org.codelibs.core.timer.TimeoutTarget
Direct Known Subclasses:
HotThreadMonitorTarget, SystemMonitorTarget

public abstract class MonitorTarget extends Object implements org.codelibs.core.timer.TimeoutTarget
Abstract base class for monitor targets that implement timeout functionality.
  • Constructor Details

    • MonitorTarget

      public MonitorTarget()
      Default constructor.
  • Method Details

    • append

      protected StringBuilder append(StringBuilder buf, String key, Supplier<Object> supplier)
      Appends a key-value pair to the buffer in JSON format.
      Parameters:
      buf - the string buffer to append to
      key - the key name
      supplier - the value supplier
      Returns:
      the updated buffer
    • appendTimestamp

      protected StringBuilder appendTimestamp(StringBuilder buf)
      Appends a timestamp to the buffer.
      Parameters:
      buf - the string buffer to append to
      Returns:
      the updated buffer
    • appendException

      protected StringBuilder appendException(StringBuilder buf, Exception exception)
      Appends exception information to the buffer.
      Parameters:
      buf - the string buffer to append to
      exception - the exception to append
      Returns:
      the updated buffer