HashMaps need to be Concurrent

This commit is contained in:
Xephi59
2015-06-29 03:02:07 +02:00
parent 108bb5c357
commit d84cd6549b
3 changed files with 8 additions and 12 deletions
+3 -3
View File
@@ -1,14 +1,14 @@
package fr.xephi.authme.cache.auth;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
public class PlayerCache {
private static PlayerCache singleton = null;
private HashMap<String, PlayerAuth> cache;
private ConcurrentHashMap<String, PlayerAuth> cache;
private PlayerCache() {
cache = new HashMap<String, PlayerAuth>();
cache = new ConcurrentHashMap<String, PlayerAuth>();
}
public void addPlayer(PlayerAuth auth) {