
com.ebay.jetstream.event.processor.ratelimiter.Tracker Maven / Gradle / Ivy
/*******************************************************************************
* Copyright © 2012-2015 eBay Software Foundation
* This program is dual licensed under the MIT and Apache 2.0 licenses.
* Please see LICENSE for more information.
*******************************************************************************/
package com.ebay.jetstream.event.processor.ratelimiter;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import com.clearspring.analytics.stream.Counter;
import com.clearspring.analytics.stream.StreamSummary;
import com.ebay.jetstream.util.disruptor.SingleConsumerDisruptorQueue;
import com.ebay.jetstream.xmlser.XSerializable;
/**
*
* This class is a helper for RateLimiterProcessor. It's purpose is to track the frequency distribution of the items which are fields in an item.
* The items which constitute the top 10 in the distribition will be penalized by picking them as candidates to be blocked
*
* @author [email protected]
*
*/
public class Tracker implements Runnable, XSerializable {
private StreamSummary
© 2015 - 2025 Weber Informatics LLC | Privacy Policy