Class LogEventList<LogEvent>
java.lang.Object
java.util.concurrent.CopyOnWriteArrayList<LogEvent>
ch.autumo.beetroot.logging.LogEventList<LogEvent>
- Type Parameters:
LogEvent- the log event
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<LogEvent>, Collection<LogEvent>, List<LogEvent>, RandomAccess, SequencedCollection<LogEvent>
Log event list with a maximum size and with shadow copies
of log events.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidresize()Resize the list, if it is too big.voidsetMaxSize(int maxSize) Set a new max.Methods inherited from class CopyOnWriteArrayList
add, addAll, addAll, addAllAbsent, addFirst, addIfAbsent, addLast, clear, clone, contains, containsAll, equals, forEach, get, getFirst, getLast, hashCode, indexOf, indexOf, isEmpty, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, stream, toArray
-
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
- Specified by:
addin interfaceCollection<LogEvent>- Specified by:
addin interfaceList<LogEvent>- Overrides:
addin classCopyOnWriteArrayList<LogEvent>
-