class RateLimitingProcessor implements Processor {

    protected Map<String, ViolationMetaData> getCurrentViolators(Map<String, Integer> reqIdCountMap, LogProcessorLambdaConfig params) {
        Date now = new Date();
        Map<String, ViolationMetaData> violators = Maps.newHashMap();

        // instead of using minute of hour as part of the key, assume that only the logs within the last interval is provided
        reqIdCountMap.entrySet().stream()
                .filter(entry -> entry.getValue() > params.getRequestPerIntervalLimit())
                .forEach(entry -> {
                    String ip = entry.getKey();
                    if (violators.containsKey(ip)) {
                        ViolationMetaData metaData = violators.get(ip);
                        if (metaData.getMaxRate() < entry.getValue()) {
                            metaData.setMaxRate(entry.getValue());
                        }
                    } else {
                        violators.put(ip, new ViolationMetaData(now, entry.getValue()));
                    }
                });

        return violators;
    }

    public  RateLimitingProcessor(ObjectMapper objectMapper, AWSWAFRegional awsWaf, AmazonS3 amazonS3);

}