Plan/Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/cache/DataID.java

62 lines
1.6 KiB
Java
Raw Normal View History

2019-08-30 22:48:36 +02:00
/*
* This file is part of Player Analytics (Plan).
*
* Plan is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3 as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Plan is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Plan. If not, see <https://www.gnu.org/licenses/>.
*/
package com.djrapitops.plan.delivery.webserver.cache;
import com.djrapitops.plan.identification.ServerUUID;
2019-08-30 22:48:36 +02:00
/**
* Enum for different JSON data entries that can be stored in cache.
2019-08-30 22:48:36 +02:00
*
2021-02-13 14:16:03 +01:00
* @author AuroraLS3
2019-08-30 22:48:36 +02:00
*/
public enum DataID {
PLAYERS,
SESSIONS,
SERVERS,
KILLS,
PING_TABLE,
GRAPH_PERFORMANCE,
GRAPH_OPTIMIZED_PERFORMANCE,
2019-08-30 22:48:36 +02:00
GRAPH_ONLINE,
GRAPH_UNIQUE_NEW,
GRAPH_HOURLY_UNIQUE_NEW,
2019-08-30 22:48:36 +02:00
GRAPH_CALENDAR,
GRAPH_WORLD_PIE,
GRAPH_WORLD_MAP,
GRAPH_ACTIVITY,
GRAPH_PING,
GRAPH_SERVER_PIE,
GRAPH_HOSTNAME_PIE,
2019-08-30 22:48:36 +02:00
GRAPH_PUNCHCARD,
SERVER_OVERVIEW,
ONLINE_OVERVIEW,
SESSIONS_OVERVIEW,
PVP_PVE,
PLAYERBASE_OVERVIEW,
PERFORMANCE_OVERVIEW,
2019-09-28 09:56:03 +02:00
EXTENSION_NAV,
EXTENSION_TABS,
EXTENSION_JSON,
LIST_SERVERS,
JOIN_ADDRESSES_BY_DAY;
2019-08-30 22:48:36 +02:00
public String of(ServerUUID serverUUID) {
if (serverUUID == null) return name();
2019-08-30 22:48:36 +02:00
return name() + '-' + serverUUID;
}
}