Interface LogBuffer.LogBufferListener

Enclosing class:
LogBuffer

public static interface LogBuffer.LogBufferListener
Interface for Listeners on changes of a LogBuffer instance's contents.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called after the buffer has been cleared.
    void
    entries(Collection<LogEntry> entries, int replaced)
    Called when multiple entries have been added in a batch.
    default void
    entry(LogEntry entry, boolean replaced)
    Called when an entry was added to the buffer.
  • Method Details

    • entry

      default void entry(LogEntry entry, boolean replaced)
      Called when an entry was added to the buffer.
      Parameters:
      entry - the added entry
      replaced - true, if the buffer's capacity was reached and another entry was removed to make space for the new one
    • entries

      void entries(Collection<LogEntry> entries, int replaced)
      Called when multiple entries have been added in a batch.
      Parameters:
      entries - the added entries
      replaced - the number of replaced entries as described in entry(LogEntry, boolean)
    • clear

      void clear()
      Called after the buffer has been cleared.