From edb02c2ba13d92c45a0b9cd16467ad8893157bcb Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 13 Apr 2024 18:02:46 +0100 Subject: [PATCH] cleanup --- .../fascinated/{model/cache => common}/CacheInformation.java | 2 +- .../java/cc/fascinated/model/cache/CachedEndpointStatus.java | 3 ++- .../java/cc/fascinated/model/cache/CachedMinecraftServer.java | 3 ++- src/main/java/cc/fascinated/model/cache/CachedPlayer.java | 3 ++- src/main/java/cc/fascinated/model/cache/CachedPlayerName.java | 3 ++- src/main/java/cc/fascinated/model/cache/CachedResponse.java | 1 + 6 files changed, 10 insertions(+), 5 deletions(-) rename src/main/java/cc/fascinated/{model/cache => common}/CacheInformation.java (96%) diff --git a/src/main/java/cc/fascinated/model/cache/CacheInformation.java b/src/main/java/cc/fascinated/common/CacheInformation.java similarity index 96% rename from src/main/java/cc/fascinated/model/cache/CacheInformation.java rename to src/main/java/cc/fascinated/common/CacheInformation.java index c56b490..7d908bc 100644 --- a/src/main/java/cc/fascinated/model/cache/CacheInformation.java +++ b/src/main/java/cc/fascinated/common/CacheInformation.java @@ -1,4 +1,4 @@ -package cc.fascinated.model.cache; +package cc.fascinated.common; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/cc/fascinated/model/cache/CachedEndpointStatus.java b/src/main/java/cc/fascinated/model/cache/CachedEndpointStatus.java index df22b9f..1f5c9ed 100644 --- a/src/main/java/cc/fascinated/model/cache/CachedEndpointStatus.java +++ b/src/main/java/cc/fascinated/model/cache/CachedEndpointStatus.java @@ -1,5 +1,6 @@ package cc.fascinated.model.cache; +import cc.fascinated.common.CacheInformation; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.*; import org.springframework.data.annotation.Id; @@ -11,7 +12,7 @@ import java.util.Map; @Setter @Getter @ToString @NoArgsConstructor @RedisHash(value = "mojangEndpointStatus", timeToLive = 60L) // 1 minute (in seconds) -public final class CachedEndpointStatus extends CachedResponse implements Serializable { +public class CachedEndpointStatus extends CachedResponse implements Serializable { /** * The id for this endpoint cache. diff --git a/src/main/java/cc/fascinated/model/cache/CachedMinecraftServer.java b/src/main/java/cc/fascinated/model/cache/CachedMinecraftServer.java index 0650c56..4e5b4e8 100644 --- a/src/main/java/cc/fascinated/model/cache/CachedMinecraftServer.java +++ b/src/main/java/cc/fascinated/model/cache/CachedMinecraftServer.java @@ -1,5 +1,6 @@ package cc.fascinated.model.cache; +import cc.fascinated.common.CacheInformation; import cc.fascinated.model.server.MinecraftServer; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.*; @@ -14,7 +15,7 @@ import java.io.Serializable; @Setter @Getter @ToString @NoArgsConstructor @RedisHash(value = "server", timeToLive = 60L) // 1 minute (in seconds) -public final class CachedMinecraftServer extends CachedResponse implements Serializable { +public class CachedMinecraftServer extends CachedResponse implements Serializable { /** * The id of this cached server. */ diff --git a/src/main/java/cc/fascinated/model/cache/CachedPlayer.java b/src/main/java/cc/fascinated/model/cache/CachedPlayer.java index 4dce392..4b92660 100644 --- a/src/main/java/cc/fascinated/model/cache/CachedPlayer.java +++ b/src/main/java/cc/fascinated/model/cache/CachedPlayer.java @@ -1,5 +1,6 @@ package cc.fascinated.model.cache; +import cc.fascinated.common.CacheInformation; import cc.fascinated.model.player.Player; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Getter; @@ -19,7 +20,7 @@ import java.util.UUID; @Setter @Getter @NoArgsConstructor @RedisHash(value = "player", timeToLive = 60L * 60L) // 1 hour (in seconds) -public final class CachedPlayer extends CachedResponse implements Serializable { +public class CachedPlayer extends CachedResponse implements Serializable { /** * The unique id of the player. */ diff --git a/src/main/java/cc/fascinated/model/cache/CachedPlayerName.java b/src/main/java/cc/fascinated/model/cache/CachedPlayerName.java index 929f20e..c2b5230 100644 --- a/src/main/java/cc/fascinated/model/cache/CachedPlayerName.java +++ b/src/main/java/cc/fascinated/model/cache/CachedPlayerName.java @@ -1,5 +1,6 @@ package cc.fascinated.model.cache; +import cc.fascinated.common.CacheInformation; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Getter; import lombok.ToString; @@ -14,7 +15,7 @@ import java.util.UUID; @Getter @ToString @RedisHash(value = "playerName", timeToLive = 60L * 60L * 6) // 6 hours (in seconds) -public final class CachedPlayerName extends CachedResponse { +public class CachedPlayerName extends CachedResponse { /** * The id of the player. */ diff --git a/src/main/java/cc/fascinated/model/cache/CachedResponse.java b/src/main/java/cc/fascinated/model/cache/CachedResponse.java index 1d1b07d..b2470eb 100644 --- a/src/main/java/cc/fascinated/model/cache/CachedResponse.java +++ b/src/main/java/cc/fascinated/model/cache/CachedResponse.java @@ -1,5 +1,6 @@ package cc.fascinated.model.cache; +import cc.fascinated.common.CacheInformation; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor;