public class HistorizableList extends Object implements Reportable, Iterable<Historizable>
| Modifier and Type | Field and Description |
|---|---|
private int |
fMaxEntriesToKeep |
private LinkedList<Historizable> |
historizables |
private static org.apache.log4j.Logger |
LOGGER |
private String |
name |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
HistorizableList(String name,
int aMaxEntriesToKeep)
This class is only constructed by
InApplicationMonitor |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ReportVisitor aVisitor)
Implements the visitor pattern to read this Counter
|
void |
add(Historizable historizable)
add a
Historizable instance to this list and remove the oldest
instance if necessary. |
Historizable |
get(int index)
This method is thread-safe in combination with size().
|
int |
getMaxEntriesToKeep() |
String |
getName() |
Iterator<Historizable> |
iterator() |
int |
size() |
private static final long serialVersionUID
private String name
private final int fMaxEntriesToKeep
private LinkedList<Historizable> historizables
private static final org.apache.log4j.Logger LOGGER
HistorizableList(String name, int aMaxEntriesToKeep)
InApplicationMonitorname - name of this Counterpublic void accept(ReportVisitor aVisitor)
accept in interface Reportablepublic String getName()
getName in interface Reportablepublic void add(Historizable historizable)
Historizable instance to this list and remove the oldest
instance if necessary.historizable - the Historizable to addpublic Iterator<Historizable> iterator()
iterator in interface Iterable<Historizable>Historizable entries.
The iterator actually iterates over a clone of the internal list,
to prevent concorrent modification problems.public int getMaxEntriesToKeep()
public int size()
Historizables.public Historizable get(int index)
index - the index of the Historizable to be returned. Can never be greater or equal than getMaxEntriesToKeep().Historizable at the index position.IndexOutOfBoundsException - if the index argument is greater or equal the size of this list.Copyright © 2013 Immobilien Scout GmbH. All Rights Reserved.