refactoring

pull/6394/head
Nikita Koksharov 2 weeks ago
parent 5d841612ea
commit d60ac52f18

@ -245,7 +245,7 @@ public class RedissonSessionStore implements SessionStore<RedissonSession>, Patt
} }
private RTopic getTopic(String name, Codec codec) { private RTopic getTopic(String name, Codec codec) {
PublishSubscribeService ss = ((Redisson) redisson).getConnectionManager().getSubscribeService(); PublishSubscribeService ss = ((Redisson) redisson).getCommandExecutor().getConnectionManager().getSubscribeService();
if (ss.isShardingSupported()) { if (ss.isShardingSupported()) {
return redisson.getShardedTopic(name, codec); return redisson.getShardedTopic(name, codec);
} }

@ -245,7 +245,7 @@ public class RedissonSessionStore implements SessionStore<RedissonSession>, Patt
} }
private RTopic getTopic(String name, Codec codec) { private RTopic getTopic(String name, Codec codec) {
PublishSubscribeService ss = ((Redisson) redisson).getConnectionManager().getSubscribeService(); PublishSubscribeService ss = ((Redisson) redisson).getCommandExecutor().getConnectionManager().getSubscribeService();
if (ss.isShardingSupported()) { if (ss.isShardingSupported()) {
return redisson.getShardedTopic(name, codec); return redisson.getShardedTopic(name, codec);
} }

@ -245,7 +245,7 @@ public class RedissonSessionStore implements SessionStore<RedissonSession>, Patt
} }
private RTopic getTopic(String name, Codec codec) { private RTopic getTopic(String name, Codec codec) {
PublishSubscribeService ss = ((Redisson) redisson).getConnectionManager().getSubscribeService(); PublishSubscribeService ss = ((Redisson) redisson).getCommandExecutor().getConnectionManager().getSubscribeService();
if (ss.isShardingSupported()) { if (ss.isShardingSupported()) {
return redisson.getShardedTopic(name, codec); return redisson.getShardedTopic(name, codec);
} }

@ -159,7 +159,7 @@ public class RedissonSessionManager extends ManagerBase {
public RTopic getTopic() { public RTopic getTopic() {
String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":"; String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName(); final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName();
PublishSubscribeService ss = ((Redisson) redisson).getConnectionManager().getSubscribeService(); PublishSubscribeService ss = ((Redisson) redisson).getCommandExecutor().getConnectionManager().getSubscribeService();
if (ss.isShardingSupported()) { if (ss.isShardingSupported()) {
return redisson.getShardedTopic(name); return redisson.getShardedTopic(name);
} }

@ -159,7 +159,7 @@ public class RedissonSessionManager extends ManagerBase {
public RTopic getTopic() { public RTopic getTopic() {
String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":"; String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName(); final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName();
PublishSubscribeService ss = ((Redisson) redisson).getConnectionManager().getSubscribeService(); PublishSubscribeService ss = ((Redisson) redisson).getCommandExecutor().getConnectionManager().getSubscribeService();
if (ss.isShardingSupported()) { if (ss.isShardingSupported()) {
return redisson.getShardedTopic(name); return redisson.getShardedTopic(name);
} }

@ -159,7 +159,7 @@ public class RedissonSessionManager extends ManagerBase {
public RTopic getTopic() { public RTopic getTopic() {
String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":"; String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContainer().getName(); String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContainer().getName();
PublishSubscribeService ss = ((Redisson) redisson).getConnectionManager().getSubscribeService(); PublishSubscribeService ss = ((Redisson) redisson).getCommandExecutor().getConnectionManager().getSubscribeService();
if (ss.isShardingSupported()) { if (ss.isShardingSupported()) {
return redisson.getShardedTopic(name); return redisson.getShardedTopic(name);
} }

@ -159,7 +159,7 @@ public class RedissonSessionManager extends ManagerBase {
public RTopic getTopic() { public RTopic getTopic() {
String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":"; String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName(); final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName();
PublishSubscribeService ss = ((Redisson) redisson).getConnectionManager().getSubscribeService(); PublishSubscribeService ss = ((Redisson) redisson).getCommandExecutor().getConnectionManager().getSubscribeService();
if (ss.isShardingSupported()) { if (ss.isShardingSupported()) {
return redisson.getShardedTopic(name); return redisson.getShardedTopic(name);
} }

@ -167,7 +167,7 @@ public class RedissonSessionManager extends ManagerBase {
public RTopic getTopic() { public RTopic getTopic() {
String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":"; String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName(); final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName();
PublishSubscribeService ss = ((Redisson) redisson).getConnectionManager().getSubscribeService(); PublishSubscribeService ss = ((Redisson) redisson).getCommandExecutor().getConnectionManager().getSubscribeService();
if (ss.isShardingSupported()) { if (ss.isShardingSupported()) {
return redisson.getShardedTopic(name); return redisson.getShardedTopic(name);
} }

@ -183,7 +183,7 @@ public final class RedissonNode {
} }
private void retrieveAddresses() { private void retrieveAddresses() {
ConnectionManager connectionManager = ((Redisson) redisson).getConnectionManager(); ConnectionManager connectionManager = ((Redisson) redisson).getCommandExecutor().getConnectionManager();
for (MasterSlaveEntry entry : connectionManager.getEntrySet()) { for (MasterSlaveEntry entry : connectionManager.getEntrySet()) {
CompletionStage<RedisConnection> readFuture = entry.connectionReadOp(null, false); CompletionStage<RedisConnection> readFuture = entry.connectionReadOp(null, false);
RedisConnection readConnection = null; RedisConnection readConnection = null;

Loading…
Cancel
Save