|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.perf4j.helpers.StopWatchLogIterator
public class StopWatchLogIterator
The StopWatchLogIterator class takes input from a Reader and parses it so that deserialized StopWatch instances can be returned with each call to next(). Log messages that are not recognized as StopWatch calls are just ignored.
Constructor Summary | |
---|---|
StopWatchLogIterator(java.lang.Readable log)
Creates a new StopWatchLogIterator to parse input from the specified Readable instance. |
Method Summary | |
---|---|
protected java.lang.String |
getStopWatchParsePattern()
Helper method gets the pattern that is used to parse StopWatches from the log. |
boolean |
hasNext()
|
StopWatch |
next()
|
protected StopWatch |
parseStopWatchFromLogMatch(java.util.regex.MatchResult matchResult)
Helper method returns a new StopWatch from the MatchResult returned when a log messages matches the getStopWatchParsePattern() pattern string. |
void |
remove()
Remove is not supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StopWatchLogIterator(java.lang.Readable log)
log
- The log containing the data to be parsed.Method Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator<StopWatch>
public StopWatch next()
next
in interface java.util.Iterator<StopWatch>
public void remove()
remove
in interface java.util.Iterator<StopWatch>
java.lang.UnsupportedOperationException
- Always thrown.protected java.lang.String getStopWatchParsePattern()
protected StopWatch parseStopWatchFromLogMatch(java.util.regex.MatchResult matchResult)
matchResult
- The regex match result
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |