org.jlot.stats.client.StatsHarvester Maven / Gradle / Ivy
package org.jlot.stats.client;
import java.util.Map;
import com.google.common.util.concurrent.AtomicLongMap;
public class StatsHarvester
{
private AtomicLongMap map = AtomicLongMap.create();
public void collect ( String code )
{
try
{
map.getAndIncrement(code);
}
catch (Exception e)
{}
}
public void reset ( )
{
map.clear();
}
public Map getMap ( )
{
return map.asMap();
}
}