Change from HashMap to ConcurrentHashMap, need to be available from

other threads !
This commit is contained in:
Xephi
2015-05-28 18:56:57 +02:00
parent 96925a580a
commit dc3a8c1f06
2 changed files with 32 additions and 35 deletions
@@ -1,8 +1,7 @@
package fr.xephi.authme.datasource;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import org.bukkit.entity.Player;
import fr.xephi.authme.AuthMe;
@@ -13,7 +12,7 @@ public class CacheDataSource extends Thread implements DataSource {
private DataSource source;
public AuthMe plugin;
private HashMap<String, PlayerAuth> cache = new HashMap<String, PlayerAuth>();
private ConcurrentHashMap<String, PlayerAuth> cache = new ConcurrentHashMap<String, PlayerAuth>();
public CacheDataSource(AuthMe plugin, DataSource source) {
this.plugin = plugin;