25 lines
756 B
Java
25 lines
756 B
Java
package net.krakatoa.proxy.redis;
|
|
|
|
import io.lettuce.core.RedisClient;
|
|
import io.lettuce.core.api.StatefulRedisConnection;
|
|
import io.lettuce.core.api.sync.RedisStringCommands;
|
|
import lombok.Data;
|
|
|
|
@Data
|
|
public class RedisManager {
|
|
|
|
private final String connectionUri;
|
|
|
|
private RedisClient client;
|
|
private StatefulRedisConnection<String, String> connection;
|
|
private RedisStringCommands<String, String> commands;
|
|
//private RedisKeyReactiveCommands<String, String> keyReactiveCommands;
|
|
|
|
public void connect() {
|
|
this.client = RedisClient.create(this.getConnectionUri());
|
|
this.connection = client.connect();
|
|
this.commands = connection.sync();
|
|
//this.keyReactiveCommands = this.connection.reactive();
|
|
}
|
|
}
|
|
// RedisKeyReactiveCommands
|