|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A Log collects and performs computations on LogRecords. This is an interface because we may implement logs different, e.g. as a local array, as a Collection, as a remote server or database, etc.
| Method Summary | |
void |
add(LogRecord record)
Stores a LogRecord in the Log if it matches the current filter (as set by setFilter, below). |
LogRecord[] |
getAll(long windowMS)
Returns all LogRecords whose timestamps are within a window of time. |
void |
setFilter(java.lang.String pattern)
Sets a regular-expression filter on what events are stored. |
| Method Detail |
public void add(LogRecord record)
public LogRecord[] getAll(long windowMS)
windowMS - return all records from the last [windowMS]
milliseconds.public void setFilter(java.lang.String pattern)
pattern - is a regular expression to match against; if the
event portion of a LogRecord passed to add, above, matches this
expression, then the LogRecord is retained, and is otherwise
discarded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||