package net.krakatoa.proxy.redis; import io.lettuce.core.RedisClient; import io.lettuce.core.dynamic.RedisCommandFactory; import lombok.Data; @Data public class RedisManager { private final String connectionUri; private RedisClient client; //private StatefulRedisConnection connection; //private RedisStringCommands commands; //private RedisKeyReactiveCommands keyReactiveCommands; private RedisKeyCommands redisKeyCommands; private RedisHashCommands redisHashCommands; public void connect() { this.client = RedisClient.create(this.getConnectionUri()); RedisCommandFactory factory = new RedisCommandFactory(client.connect()); factory.setVerifyCommandMethods(false); this.redisKeyCommands = factory.getCommands(RedisKeyCommands.class); this.redisHashCommands = factory.getCommands(RedisHashCommands.class); //this.connection = client.connect(); //this.commands = connection.sync(); //this.keyReactiveCommands = this.connection.reactive(); } } // RedisKeyReactiveCommands