Fix issue w/ live cache updates
This commit is contained in:
parent
983c428a09
commit
8d66bd1568
@ -34,7 +34,7 @@ public final class BannedAsn {
|
|||||||
@Getter private Instant lastUpdatedAt;
|
@Getter private Instant lastUpdatedAt;
|
||||||
|
|
||||||
public static List<BannedAsn> findAll() {
|
public static List<BannedAsn> findAll() {
|
||||||
return bannedAsnCache;
|
return ImmutableList.copyOf(bannedAsnCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BannedAsn findById(int id) {
|
public static BannedAsn findById(int id) {
|
||||||
@ -58,8 +58,8 @@ public final class BannedAsn {
|
|||||||
working.put(bannedAsn.getId(), bannedAsn);
|
working.put(bannedAsn.getId(), bannedAsn);
|
||||||
}
|
}
|
||||||
|
|
||||||
bannedAsnIdCache = ImmutableMap.copyOf(working);
|
bannedAsnIdCache = working;
|
||||||
bannedAsnCache = ImmutableList.copyOf(bannedAsns);
|
bannedAsnCache = bannedAsns;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ public final class BannedCellCarrier {
|
|||||||
@Getter private Instant lastUpdatedAt;
|
@Getter private Instant lastUpdatedAt;
|
||||||
|
|
||||||
public static List<BannedCellCarrier> findAll() {
|
public static List<BannedCellCarrier> findAll() {
|
||||||
return bannedCellCarrierCache;
|
return ImmutableList.copyOf(bannedCellCarrierCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BannedCellCarrier findById(int id) {
|
public static BannedCellCarrier findById(int id) {
|
||||||
@ -59,8 +59,8 @@ public final class BannedCellCarrier {
|
|||||||
working.put(bannedCellCarrier.getId(), bannedCellCarrier);
|
working.put(bannedCellCarrier.getId(), bannedCellCarrier);
|
||||||
}
|
}
|
||||||
|
|
||||||
bannedCellCarrierIdCache = ImmutableMap.copyOf(working);
|
bannedCellCarrierIdCache = working;
|
||||||
bannedCellCarrierCache = ImmutableList.copyOf(bannedCellCarriers);
|
bannedCellCarrierCache = bannedCellCarriers;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ public final class Rank {
|
|||||||
@Getter private boolean staffRank;
|
@Getter private boolean staffRank;
|
||||||
|
|
||||||
public static List<Rank> findAll() {
|
public static List<Rank> findAll() {
|
||||||
return rankCache;
|
return ImmutableList.copyOf(rankCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Rank findById(String id) {
|
public static Rank findById(String id) {
|
||||||
@ -58,8 +58,8 @@ public final class Rank {
|
|||||||
working.put(rank.getId(), rank);
|
working.put(rank.getId(), rank);
|
||||||
}
|
}
|
||||||
|
|
||||||
rankIdCache = ImmutableMap.copyOf(working);
|
rankIdCache = working;
|
||||||
rankCache = ImmutableList.copyOf(ranks);
|
rankCache = ranks;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public final class Server {
|
|||||||
@Getter @ExcludeFromReplies private Set<UUID> players;
|
@Getter @ExcludeFromReplies private Set<UUID> players;
|
||||||
|
|
||||||
public static List<Server> findAll() {
|
public static List<Server> findAll() {
|
||||||
return serverCache;
|
return ImmutableList.copyOf(serverCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Server findById(String id) {
|
public static Server findById(String id) {
|
||||||
@ -62,8 +62,8 @@ public final class Server {
|
|||||||
working.put(server.getId(), server);
|
working.put(server.getId(), server);
|
||||||
}
|
}
|
||||||
|
|
||||||
serverIdCache = ImmutableMap.copyOf(working);
|
serverIdCache = working;
|
||||||
serverCache = ImmutableList.copyOf(servers);
|
serverCache = servers;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public final class ServerGroup {
|
|||||||
@Getter @Setter @ExcludeFromReplies private Map<String, List<String>> permissions;
|
@Getter @Setter @ExcludeFromReplies private Map<String, List<String>> permissions;
|
||||||
|
|
||||||
public static List<ServerGroup> findAll() {
|
public static List<ServerGroup> findAll() {
|
||||||
return serverGroupCache;
|
return ImmutableList.copyOf(serverGroupCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ServerGroup findById(String id) {
|
public static ServerGroup findById(String id) {
|
||||||
@ -56,8 +56,8 @@ public final class ServerGroup {
|
|||||||
working.put(serverGroup.getId(), serverGroup);
|
working.put(serverGroup.getId(), serverGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
serverGroupIdCache = ImmutableMap.copyOf(working);
|
serverGroupIdCache = working;
|
||||||
serverGroupCache = ImmutableList.copyOf(serverGroups);
|
serverGroupCache = serverGroups;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user