All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nuisto.aggregator.LoggerOccurrenceAggregator.groovy Maven / Gradle / Ivy

There is a newer version: 0.6.0-alpha-1
Show newest version
package org.nuisto.aggregator

import org.nuisto.NodeChecker

class LoggerOccurrenceAggregator implements Aggregator {

  int loggerCount

  LoggerOccurrenceAggregator() {
    init()
  }

  void init() {
    loggerCount = 0
  }

  void reset() {
    init()
  }

  void handleNode(Node node, NodeChecker nodeChecker) {
    if (nodeChecker.isMatch(node, 'logger')) {
      ++loggerCount
    }
  }

  Map getTotals() {
    return ['loggerCount': loggerCount]
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy