redis test
parent
80f220c062
commit
d5eb6ef5f3
|
@ -86,9 +86,8 @@ public class ProxySystem extends Plugin {
|
|||
this.kraSocketClient.getSocketClient().getConnection().closeConnection(1, "");
|
||||
|
||||
this.mongoManager.getMongoClient().close();
|
||||
|
||||
//this.redisManager.getConnection().close();
|
||||
//this.redisManager.getClient().shutdown();
|
||||
|
||||
this.redisManager.close();
|
||||
|
||||
instance = null;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package net.krakatoa.proxy.redis;
|
|||
import lombok.Data;
|
||||
import org.redisson.Redisson;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.redisson.codec.JsonJacksonCodec;
|
||||
import org.redisson.config.Config;
|
||||
|
||||
@Data
|
||||
|
@ -20,6 +21,7 @@ public class RedisManager {
|
|||
|
||||
public void connect() {
|
||||
this.config = new Config();
|
||||
this.config.setCodec(new JsonJacksonCodec());
|
||||
this.config.useSingleServer().setAddress(this.connectionUri);
|
||||
|
||||
this.redissonClient = Redisson.create(this.config);
|
||||
|
@ -28,5 +30,9 @@ public class RedisManager {
|
|||
//this.commands = connection.sync();
|
||||
//this.keyReactiveCommands = this.connection.reactive();
|
||||
}
|
||||
|
||||
public void close() {
|
||||
this.redissonClient.shutdown();
|
||||
}
|
||||
}
|
||||
// RedisKeyReactiveCommands
|
Loading…
Reference in New Issue