I am able to retrieve values from Redis
using Jedis
:
public static void main(String[] args) {
Jedis jedis = new Jedis(HOST, POR
You could do it much easier with Redisson:
public static void main(String[] args) {
Config conf = new Config();
conf.useSingleServer().setAddress(host + ":" + port);
RedissonClient redisson = Redisson.create(conf);
RSet set = redisson.getSet(KEY)
for (String s : set.readAllValues()) {
System.out.println(s);
}
redisson.shutdown();
}
This framewrok handles serialization and work with connection so you don't need to deal with it each time. Work with Redis as you used to work with Java objects (Set, Map, List ...). It supports many popular codecs too.