Package ch.autumo.beetroot.logging
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
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. size for the list.Methods inherited from class java.util.concurrent.CopyOnWriteArrayList
add, addAll, addAll, addAllAbsent, addIfAbsent, clear, clone, contains, containsAll, equals, forEach, get, hashCode, indexOf, indexOf, isEmpty, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.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>
-