Class LogNotificationHelper

java.lang.Object
org.codelibs.fess.helper.LogNotificationHelper

public class LogNotificationHelper extends Object
Helper that manages the lifecycle of the log notification timer and buffers log notification events for periodic flushing to OpenSearch.
  • 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

      public void offer(LogNotificationHelper.LogNotificationEvent event)
      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