use of nl.basjes.parse.useragent.analyze.MatcherList in project yauaa by nielsbasjes.
the class AbstractUserAgentAnalyzerDirect method initializeMatchers.
public synchronized void initializeMatchers() {
if (matchersHaveBeenInitialized) {
return;
}
LOG.info("Initializing Analyzer data structures");
if (allMatchers.isEmpty()) {
throw new InvalidParserConfigurationException("No matchers were loaded at all.");
}
long start = System.nanoTime();
allMatchers.forEach(Matcher::initialize);
long stop = System.nanoTime();
matchersHaveBeenInitialized = true;
LOG.info("Built in {} msec : Hashmap {}, Ranges map:{}", (stop - start) / 1000000, informMatcherActions.size(), informMatcherActionRanges.size());
for (Matcher matcher : allMatchers) {
if (matcher.getActionsThatRequireInput() == 0) {
zeroInputMatchers.add(matcher);
}
}
// Reset all Matchers
for (Matcher matcher : allMatchers) {
matcher.reset();
}
touchedMatchers = new MatcherList(32);
}
Aggregations