mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-23 09:37:54 +01:00
Config operations
This commit is contained in:
parent
60b771e005
commit
cfc7f25a07
@ -25,6 +25,7 @@ import com.djrapitops.plan.data.store.containers.NetworkContainer;
|
||||
import com.djrapitops.plan.data.store.containers.PlayerContainer;
|
||||
import com.djrapitops.plan.data.store.containers.ServerContainer;
|
||||
import com.djrapitops.plan.system.info.server.Server;
|
||||
import com.djrapitops.plan.system.settings.config.Config;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -135,4 +136,6 @@ public interface FetchOperations {
|
||||
Map<Integer, List<TPS>> getPlayersOnlineForServers(Collection<Server> servers);
|
||||
|
||||
Map<UUID, Integer> getPlayersRegisteredForServers(Collection<Server> servers);
|
||||
|
||||
Optional<Config> getNewConfig(long updatedAfter, UUID serverUUID);
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import com.djrapitops.plan.data.WebUser;
|
||||
import com.djrapitops.plan.data.container.*;
|
||||
import com.djrapitops.plan.data.store.objects.Nickname;
|
||||
import com.djrapitops.plan.system.info.server.Server;
|
||||
import com.djrapitops.plan.system.settings.config.Config;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -83,4 +84,6 @@ public interface SaveOperations {
|
||||
void ping(UUID uuid, Ping ping);
|
||||
|
||||
void setAsUninstalled(UUID serverUUID);
|
||||
|
||||
void saveConfig(UUID serverUUID, Config config);
|
||||
}
|
@ -30,6 +30,7 @@ import com.djrapitops.plan.system.cache.SessionCache;
|
||||
import com.djrapitops.plan.system.database.databases.operation.FetchOperations;
|
||||
import com.djrapitops.plan.system.database.databases.sql.SQLDB;
|
||||
import com.djrapitops.plan.system.info.server.Server;
|
||||
import com.djrapitops.plan.system.settings.config.Config;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -496,4 +497,9 @@ public class SQLFetchOps extends SQLOps implements FetchOperations {
|
||||
public Map<UUID, Integer> getPlayersRegisteredForServers(Collection<Server> servers) {
|
||||
return userInfoTable.getPlayersRegisteredForServers(servers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Config> getNewConfig(long updatedAfter, UUID serverUUID) {
|
||||
return settingsTable.fetchNewerConfig(updatedAfter, serverUUID);
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.djrapitops.plan.data.store.objects.Nickname;
|
||||
import com.djrapitops.plan.system.database.databases.operation.SaveOperations;
|
||||
import com.djrapitops.plan.system.database.databases.sql.SQLDB;
|
||||
import com.djrapitops.plan.system.info.server.Server;
|
||||
import com.djrapitops.plan.system.settings.config.Config;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -152,4 +153,9 @@ public class SQLSaveOps extends SQLOps implements SaveOperations {
|
||||
public void setAsUninstalled(UUID serverUUID) {
|
||||
serverTable.setAsUninstalled(serverUUID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveConfig(UUID serverUUID, Config config) {
|
||||
settingsTable.storeConfig(serverUUID, config);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user