diff --git a/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index 50efdd434..19350113b 100644 --- a/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -238,7 +238,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index be37ce0d0..24480cacc 100644 --- a/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 9b323c71f..1bbb65467 100644 --- a/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-16/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index 88a1dd22f..edb8c7af8 100644 --- a/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index 8c973e0b4..fd32fb8f6 100644 --- a/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -239,7 +239,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index 7cee96016..a4d0ed7c6 100644 --- a/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 9b323c71f..1bbb65467 100644 --- a/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-17/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-18/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-18/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index a71e98e82..1cecff9bc 100644 --- a/redisson-spring-data/redisson-spring-data-18/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-18/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index f2c237437..c54da2b60 100644 --- a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index db38f4f22..045b107e3 100644 --- a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -243,7 +243,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ed5b3e360..2fa39ccc9 100644 --- a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index fa99631b5..f7090f92a 100644 --- a/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-20/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index a1c0e7bc0..cb847deea 100644 --- a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index cd4bf0ca9..62cddb447 100644 --- a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ed5b3e360..2fa39ccc9 100644 --- a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 9b323c71f..1bbb65467 100644 --- a/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-21/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index a1c0e7bc0..cb847deea 100644 --- a/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index ccafdc80e..c9553922c 100644 --- a/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 9b323c71f..1bbb65467 100644 --- a/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-22/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index a1c0e7bc0..cb847deea 100644 --- a/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index b4ddf12d8..d2633a480 100644 --- a/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 9b323c71f..1bbb65467 100644 --- a/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-23/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index a1c0e7bc0..cb847deea 100644 --- a/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index afb508d5e..1e6b6f0a3 100644 --- a/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 9b323c71f..1bbb65467 100644 --- a/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-24/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index a1c0e7bc0..cb847deea 100644 --- a/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index 6513dea80..928a62430 100644 --- a/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -246,7 +246,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 9b323c71f..1bbb65467 100644 --- a/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-25/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index bb7ac9fda..cb847deea 100644 --- a/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index 3287c4242..d6a797e05 100644 --- a/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -251,7 +251,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 642e0e1dd..005e58e4a 100644 --- a/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-26/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index d7d778d99..e60b4e3e8 100644 --- a/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index e834037ea..60fb95e2c 100644 --- a/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -251,7 +251,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 36c540d0b..096f0a8fb 100644 --- a/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-27/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index a5b00c81f..92c30b104 100644 --- a/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index b4ec80cb3..281f2db5b 100644 --- a/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 36c540d0b..096f0a8fb 100644 --- a/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-30/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index 5868a0f7f..d388f1ec9 100644 --- a/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index b44bdb8e0..a82bfad57 100644 --- a/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index 00e4c7d39..6f308da22 100644 --- a/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 3bffbd1b2..69be456a0 100644 --- a/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-31/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index 32e02fc26..14a575c72 100644 --- a/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index b7d5ec720..12e99a43d 100644 --- a/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(0, options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 08b68e598..f9c69b6fc 100644 --- a/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-32/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index f1a2fbd4d..f69b1b29b 100644 --- a/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index 53065ad7f..05033cb51 100644 --- a/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(Cursor.CursorId.initial(), options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 08b68e598..af19a0c8b 100644 --- a/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-33/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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 diff --git a/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java b/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java index f1a2fbd4d..f69b1b29b 100644 --- a/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java +++ b/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonClusterConnection.java @@ -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); } diff --git a/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java b/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java index 53065ad7f..c13c596af 100644 --- a/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java +++ b/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonConnection.java @@ -255,7 +255,7 @@ public class RedissonConnection extends AbstractRedisConnection { return new ScanCursor(Cursor.CursorId.initial(), options) { private RedisClient client; - private Iterator entries = redisson.getConnectionManager().getEntrySet().iterator(); + private Iterator 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); } diff --git a/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java b/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java index ecdb97282..7f63d2f05 100644 --- a/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java +++ b/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonConnectionFactory.java @@ -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 { diff --git a/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java b/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java index 08b68e598..f9c69b6fc 100644 --- a/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java +++ b/redisson-spring-data/redisson-spring-data-34/src/main/java/org/redisson/spring/data/connection/RedissonSubscription.java @@ -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