Class LogEventList<LogEvent>

java.lang.Object
java.util.concurrent.CopyOnWriteArrayList<LogEvent>
ch.autumo.beetroot.logging.LogEventList<LogEvent>
Type Parameters:
LogEvent -
All Implemented Interfaces:
Serializable, Cloneable, Iterable<LogEvent>, Collection<LogEvent>, List<LogEvent>, RandomAccess

public class LogEventList<LogEvent> extends CopyOnWriteArrayList<LogEvent>
Log event list with a maximum size and with shadow copies of log events.
See Also:
  • Constructor Details

    • LogEventList

      public LogEventList(int maxSize)
      Create a log event list
      Parameters:
      maxSize - initial max. size
  • Method Details

    • setMaxSize

      public void setMaxSize(int maxSize)
      Set a new max. size for the list.
      Parameters:
      maxSize - new max. size
    • resize

      public void resize()
      Resize the list, if it is too big.
    • add

      public boolean add(LogEvent e)
      Specified by:
      add in interface Collection<LogEvent>
      Specified by:
      add in interface List<LogEvent>
      Overrides:
      add in class CopyOnWriteArrayList<LogEvent>