Commit c49c6702 authored by Alex Wenckus's avatar Alex Wenckus Committed by alex

Added ability to remove stat

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3832 b35dd754-fafc-0310-a699-88a17e54d16e
parent aba737ec
......@@ -12,7 +12,7 @@ package org.jivesoftware.wildfire.stats;
import java.util.Collection;
import java.util.Map;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
/**
* Stores statistics being tracked by the server.
......@@ -24,7 +24,7 @@ public class StatisticsManager {
return instance;
}
private final Map<String, Statistic> statistics = new HashMap<String, Statistic>();
private final Map<String, Statistic> statistics = new ConcurrentHashMap<String, Statistic>();
private StatisticsManager() {}
......@@ -55,4 +55,13 @@ public class StatisticsManager {
return statistics.values();
}
/**
* Removes a statistic from the server.
*
* @param statKey The key of the stat to be removed.
*/
public void removeStatistic(String statKey) {
statistics.remove(statKey);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment