|
|
|
@ -18,6 +18,7 @@ package org.redisson.spring.data.connection;
|
|
|
|
|
import org.apache.commons.logging.Log;
|
|
|
|
|
import org.apache.commons.logging.LogFactory;
|
|
|
|
|
import org.redisson.Redisson;
|
|
|
|
|
import org.redisson.RedissonKeys;
|
|
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
|
|
import org.redisson.client.RedisClient;
|
|
|
|
|
import org.redisson.client.protocol.RedisCommands;
|
|
|
|
@ -121,7 +122,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
|
|
|
|
|
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SentinelConnectionManager manager = ((SentinelConnectionManager)((Redisson)redisson).getConnectionManager());
|
|
|
|
|
SentinelConnectionManager manager = ((SentinelConnectionManager)((RedissonKeys)redisson.getKeys()).getConnectionManager());
|
|
|
|
|
for (RedisClient client : manager.getSentinels()) {
|
|
|
|
|
org.redisson.client.RedisConnection connection = client.connect();
|
|
|
|
|
try {
|
|
|
|
@ -140,12 +141,12 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ReactiveRedisConnection getReactiveConnection() {
|
|
|
|
|
return new RedissonReactiveRedisConnection(new CommandReactiveService(((Redisson)redisson).getConnectionManager()));
|
|
|
|
|
return new RedissonReactiveRedisConnection(new CommandReactiveService(((RedissonKeys)redisson.getKeys()).getConnectionManager()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ReactiveRedisClusterConnection getReactiveClusterConnection() {
|
|
|
|
|
return new RedissonReactiveRedisClusterConnection(new CommandReactiveService(((Redisson)redisson).getConnectionManager()));
|
|
|
|
|
return new RedissonReactiveRedisClusterConnection(new CommandReactiveService(((RedissonKeys)redisson.getKeys()).getConnectionManager()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|