|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--LocalLog
A LocalLog is an implementation of the Log interface that resides in the instrumented program's memory. We implement it as a fixed-sized Collection along with the regular expression inclusion filter.
| Constructor Summary | |
LocalLog(int logSize)
Constructor specifies the size of the log. |
|
| Method Summary | |
void |
add(LogRecord record)
Adds a record to the log, assuming it matches the pattern given to setFilter. |
LogRecord[] |
getAll(long windowMS)
Returns all LogRecords whose timestamps are within a window of time. |
void |
setFilter(java.lang.String strPat)
Sets a regular-expression filter on what events are stored. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LocalLog(int logSize)
logSize - the number of records we can store in the log.| Method Detail |
public void add(LogRecord record)
add in interface Logpublic LogRecord[] getAll(long windowMS)
getAll in interface LogwindowMS - return all records from the last [windowMS]
milliseconds.public void setFilter(java.lang.String strPat)
Log
setFilter in interface LogstrPat - 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.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||