Package org.codelibs.fess.helper
Class LogNotificationHelper
java.lang.Object
org.codelibs.fess.helper.LogNotificationHelper
Helper that manages the lifecycle of the log notification timer and
buffers log notification events for periodic flushing to OpenSearch.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a captured log event for notification. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LogNotificationHelper
public LogNotificationHelper()Default constructor.
-
-
Method Details
-
init
@PostConstruct public void init()Initializes the log notification timer. -
destroy
@PreDestroy public void destroy()Stops the log notification timer and performs a final flush. -
offer
Offers an event to the buffer. If the buffer exceeds the maximum size, the oldest event is dropped.- Parameters:
event- the log notification event to add
-
drainAll
Drains all events from the buffer and returns them as a list.- Returns:
- a list of all buffered events
-