Merge pull request #6396 from seakider/imp_springdata

Improvement - Spring Data Redis refactoring #6393
pull/6398/head
Nikita Koksharov 2 weeks ago committed by GitHub
commit b6e4b5dc54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

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

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

@ -381,7 +381,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); super.rename(oldName, newName);
return; return;
} }
@ -410,7 +410,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

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

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

@ -127,7 +127,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -416,7 +415,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -126,7 +126,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -126,7 +126,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -434,7 +434,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); super.rename(oldName, newName);
return; return;
} }
@ -463,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -464,7 +463,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Def
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -462,7 +461,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -15,7 +15,6 @@
*/ */
package org.redisson.spring.data.connection; package org.redisson.spring.data.connection;
import io.netty.util.CharsetUtil;
import org.redisson.api.BatchResult; import org.redisson.api.BatchResult;
import org.redisson.api.RFuture; import org.redisson.api.RFuture;
import org.redisson.api.RedissonClient; 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"); 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); super.rename(oldName, newName);
return; return;
} }
@ -461,7 +460,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -429,7 +429,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); super.rename(oldName, newName);
return; return;
} }
@ -458,7 +458,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -429,7 +429,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); super.rename(oldName, newName);
return; return;
} }
@ -458,7 +458,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

@ -429,7 +429,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); super.rename(oldName, newName);
return; return;
} }
@ -458,7 +458,7 @@ public class RedissonClusterConnection extends RedissonConnection implements Red
throw new InvalidDataAccessResourceUsageException("Clustered rename is not supported in a pipeline"); 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); return super.renameNX(oldName, newName);
} }

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

@ -132,7 +132,7 @@ public class RedissonConnectionFactory implements RedisConnectionFactory,
throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode"); 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()) { for (RedisClient client : manager.getSentinels()) {
org.redisson.client.RedisConnection connection = null; org.redisson.client.RedisConnection connection = null;
try { try {

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

Loading…
Cancel
Save