Removed DataCache#getUUIDof - the cache was never updated

This commit is contained in:
Rsl1122 2019-02-02 09:11:24 +02:00
parent e2507c249b
commit 48ec77c30e
3 changed files with 2 additions and 25 deletions

View File

@ -45,7 +45,6 @@ public class DataCache extends SessionCache implements SubSystem {
private final ErrorHandler errorHandler;
private final Map<String, UUID> uuids;
private final Map<UUID, String> displayNames;
@Inject
@ -56,7 +55,6 @@ public class DataCache extends SessionCache implements SubSystem {
super(dbSystem);
this.errorHandler = errorHandler;
displayNames = new HashMap<>();
uuids = new HashMap<>();
}
@Override
@ -66,7 +64,6 @@ public class DataCache extends SessionCache implements SubSystem {
@Override
public void disable() {
uuids.clear();
displayNames.clear();
}
@ -105,8 +102,4 @@ public class DataCache extends SessionCache implements SubSystem {
}
return cached;
}
public UUID getUUIDof(String playerName) {
return uuids.get(playerName);
}
}

View File

@ -18,10 +18,8 @@ package com.djrapitops.plan.system.processing.processors.player;
import com.djrapitops.plan.data.store.objects.Nickname;
import com.djrapitops.plan.system.cache.DataCache;
import com.djrapitops.plan.system.cache.GeolocationCache;
import com.djrapitops.plan.system.database.DBSystem;
import com.djrapitops.plan.system.info.server.ServerInfo;
import com.djrapitops.plan.system.processing.Processing;
import dagger.Lazy;
import javax.inject.Inject;
@ -37,25 +35,19 @@ import java.util.function.BooleanSupplier;
@Singleton
public class PlayerProcessors {
private final Lazy<Processing> processing;
private final Lazy<ServerInfo> serverInfo;
private final Lazy<DBSystem> dbSystem;
private final Lazy<DataCache> dataCache;
private final Lazy<GeolocationCache> geolocationCache;
@Inject
public PlayerProcessors(
Lazy<Processing> processing,
Lazy<ServerInfo> serverInfo,
Lazy<DBSystem> dbSystem,
Lazy<DataCache> dataCache,
Lazy<GeolocationCache> geolocationCache
Lazy<DataCache> dataCache
) {
this.processing = processing;
this.serverInfo = serverInfo;
this.dbSystem = dbSystem;
this.dataCache = dataCache;
this.geolocationCache = geolocationCache;
}
public BanAndOpProcessor banAndOpProcessor(UUID uuid, BooleanSupplier banned, boolean op) {

View File

@ -17,7 +17,6 @@
package com.djrapitops.plan.utilities.uuid;
import com.djrapitops.plan.api.exceptions.database.DBOpException;
import com.djrapitops.plan.system.cache.DataCache;
import com.djrapitops.plan.system.database.DBSystem;
import com.djrapitops.plugin.api.utility.UUIDFetcher;
import com.djrapitops.plugin.logging.L;
@ -33,13 +32,11 @@ import java.util.UUID;
@Singleton
public class UUIDUtility {
private final DataCache dataCache;
private final DBSystem dbSystem;
private final ErrorHandler errorHandler;
@Inject
public UUIDUtility(DataCache dataCache, DBSystem dbSystem, ErrorHandler errorHandler) {
this.dataCache = dataCache;
public UUIDUtility(DBSystem dbSystem, ErrorHandler errorHandler) {
this.dbSystem = dbSystem;
this.errorHandler = errorHandler;
}
@ -56,11 +53,6 @@ public class UUIDUtility {
return uuid;
}
uuid = dataCache.getUUIDof(playerName);
if (uuid != null) {
return uuid;
}
uuid = getUUIDFromDB(playerName);
if (uuid != null) {
return uuid;