|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.is24.util.monitoring.HistorizableList
public class HistorizableList
This list manages ordering and discarding of registered Historizables with the same name.
| Field Summary | |
|---|---|
private int |
fMaxEntriesToKeep
|
private LinkedList<Historizable> |
historizables
|
private static org.apache.log4j.Logger |
LOGGER
|
private String |
name
|
private static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
HistorizableList(String name,
int aMaxEntriesToKeep)
This class is only constructed by InApplicationMonitor |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private String name
private final int fMaxEntriesToKeep
private LinkedList<Historizable> historizables
private static final org.apache.log4j.Logger LOGGER
| Constructor Detail |
|---|
HistorizableList(String name,
int aMaxEntriesToKeep)
InApplicationMonitor
name - name of this Counter| Method Detail |
|---|
public 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||