Merge branch 'master' of github.com:redisson/redisson

pull/6404/head^2
Nikita Koksharov 2 weeks ago
commit 4afe10003e

@ -238,7 +238,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1550,7 +1550,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1571,7 +1571,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -108,7 +108,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory, Initia
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -381,7 +381,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -410,7 +410,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -239,7 +239,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1577,7 +1577,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1598,7 +1598,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -120,7 +120,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory, Initia
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -127,7 +127,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -387,7 +386,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -416,7 +415,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -243,7 +243,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1608,7 +1608,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1629,7 +1629,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -126,7 +126,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -435,7 +434,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1611,7 +1611,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(redisson.getCommandExecutor(), redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(redisson.getCommandExecutor(), listener);
subscription.subscribe(channels);
}
@ -1632,7 +1632,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(redisson.getCommandExecutor(), redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(redisson.getCommandExecutor(), listener);
subscription.pSubscribe(patterns);
}

@ -126,7 +126,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -435,7 +434,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1610,7 +1610,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1631,7 +1631,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -435,7 +434,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1611,7 +1611,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(redisson.getCommandExecutor(), redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(redisson.getCommandExecutor(), listener);
subscription.subscribe(channels);
}
@ -1632,7 +1632,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(redisson.getCommandExecutor(), redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(redisson.getCommandExecutor(), listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -435,7 +434,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1635,7 +1635,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1656,7 +1656,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -435,7 +434,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1675,7 +1675,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1696,7 +1696,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -434,7 +434,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -463,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -251,7 +251,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1680,7 +1680,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1701,7 +1701,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -435,7 +434,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -251,7 +251,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1680,7 +1680,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1701,7 +1701,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -45,10 +45,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -433,7 +432,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -462,7 +461,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1607,7 +1607,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1628,7 +1628,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -45,10 +45,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -15,7 +15,6 @@
*/
package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult;
import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient;
@ -432,7 +431,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -461,7 +460,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1607,7 +1607,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1628,7 +1628,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -42,10 +42,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -429,7 +429,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -458,7 +458,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(0, options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1607,7 +1607,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1628,7 +1628,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -45,10 +45,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -429,7 +429,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -458,7 +458,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(Cursor.CursorId.initial(), options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1607,7 +1607,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1628,7 +1628,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -45,10 +45,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -429,7 +429,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
super.rename(oldName, newName);
return;
}
@ -458,7 +458,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline");
}
if (redisson.getConnectionManager().calcSlot(oldName) == redisson.getConnectionManager().calcSlot(newName)) {
if (executorService.getConnectionManager().calcSlot(oldName) == executorService.getConnectionManager().calcSlot(newName)) {
return super.renameNX(oldName, newName);
}

@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection {
return new ScanCursor<byte[]>(Cursor.CursorId.initial(), options) {
private RedisClient client;
private Iterator<MasterSlaveEntry> entries = redisson.getConnectionManager().getEntrySet().iterator();
private Iterator<MasterSlaveEntry> entries = executorService.getConnectionManager().getEntrySet().iterator();
private MasterSlaveEntry entry = entries.next();
@Override
@ -1606,8 +1606,8 @@ public class RedissonConnection extends AbstractRedisConnection {
@Override
public void subscribe(MessageListener listener, byte[]... channels) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.subscribe(channels);
}
@ -1628,7 +1628,7 @@ public class RedissonConnection extends AbstractRedisConnection {
public void pSubscribe(MessageListener listener, byte[]... patterns) {
checkSubscription();
subscription = new RedissonSubscription(executorService, redisson.getConnectionManager().getSubscribeService(), listener);
subscription = new RedissonSubscription(executorService, listener);
subscription.pSubscribe(patterns);
}

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
}
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getConnectionManager());
SentinelConnectionManager manager = (SentinelConnectionManager)(((Redisson)redisson).getCommandExecutor().getConnectionManager());
for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null;
try {

@ -45,10 +45,10 @@ public class RedissonSubscription extends AbstractSubscription {
private final CommandAsyncExecutor commandExecutor;
private final PublishSubscribeService subscribeService;
public RedissonSubscription(CommandAsyncExecutor commandExecutor, PublishSubscribeService subscribeService, MessageListener listener) {
public RedissonSubscription(CommandAsyncExecutor commandExecutor, MessageListener listener) {
super(listener, null, null);
this.commandExecutor = commandExecutor;
this.subscribeService = subscribeService;
this.subscribeService = commandExecutor.getConnectionManager().getSubscribeService();
}
@Override

@ -508,7 +508,8 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager {
RFuture<RedisURI> masterFuture = connection.async(1, cfg.getRetryInterval(), cfg.getTimeout(),
StringCodec.INSTANCE, masterHostCommand, cfg.getMasterName());
return masterFuture
.thenCompose(u -> serviceManager.resolveIP(scheme, u))
.thenCompose(u -> resolveIP(u.getHost(), "" + u.getPort()))
.thenApply(this::toURI)
.thenCompose(newMaster -> {
RedisURI current = currentMaster.get();
if (!newMaster.equals(current)

Loading…
Cancel
Save