Package org.codelibs.fess.timer
Class MonitorTarget
java.lang.Object
org.codelibs.fess.timer.MonitorTarget
- All Implemented Interfaces:
org.codelibs.core.timer.TimeoutTarget
- Direct Known Subclasses:
HotThreadMonitorTarget,SystemMonitorTarget
Abstract base class for monitor targets that implement timeout functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuilderappend(StringBuilder buf, String key, Supplier<Object> supplier) Appends a key-value pair to the buffer in JSON format.protected StringBuilderappendException(StringBuilder buf, Exception exception) Appends exception information to the buffer.protected StringBuilderAppends a timestamp to the buffer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.codelibs.core.timer.TimeoutTarget
expired
-
Constructor Details
-
MonitorTarget
public MonitorTarget()Default constructor.
-
-
Method Details
-
append
Appends a key-value pair to the buffer in JSON format.- Parameters:
buf- the string buffer to append tokey- the key namesupplier- the value supplier- Returns:
- the updated buffer
-
appendTimestamp
Appends a timestamp to the buffer.- Parameters:
buf- the string buffer to append to- Returns:
- the updated buffer
-
appendException
Appends exception information to the buffer.- Parameters:
buf- the string buffer to append toexception- the exception to append- Returns:
- the updated buffer
-