This repository has been archived on 2023-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
McGamerZone/testing/src/main/java/zone/themcgamer/test/Test.java

30 lines
1007 B
Java
Raw Normal View History

2021-02-19 20:11:08 +00:00
package zone.themcgamer.test;
import lombok.SneakyThrows;
import zone.themcgamer.data.jedis.JedisController;
import zone.themcgamer.data.jedis.data.ServerGroup;
import zone.themcgamer.data.jedis.repository.RedisRepository;
import zone.themcgamer.data.jedis.repository.impl.ServerGroupRepository;
import java.util.List;
import java.util.Optional;
/**
* @author Braydon
* @implNote This class is strictly for testing purposes
*/
public class Test {
@SneakyThrows
public static void main(String[] args) {
new JedisController().start();
Optional<ServerGroupRepository> repository = RedisRepository.getRepository(ServerGroupRepository.class);
while (repository.isPresent()) {
List<ServerGroup> cached = repository.get().getCached();
for (ServerGroup serverGroup : cached)
System.out.println(serverGroup.toString());
System.out.println("total cached = " + cached.size());
Thread.sleep(1000L);
}
}
}