From bd5406331839e307e5702af244ba6fae658672e5 Mon Sep 17 00:00:00 2001 From: smallbun <2689170096@qq.com> Date: Mon, 12 Aug 2024 22:24:31 +0800 Subject: [PATCH] public the relevant configuration methods --- .../main/java/org/redisson/config/Config.java | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/redisson/src/main/java/org/redisson/config/Config.java b/redisson/src/main/java/org/redisson/config/Config.java index 5aa0ffebc..27cc3ec0d 100644 --- a/redisson/src/main/java/org/redisson/config/Config.java +++ b/redisson/src/main/java/org/redisson/config/Config.java @@ -232,11 +232,11 @@ public class Config { return clusterServersConfig; } - protected ClusterServersConfig getClusterServersConfig() { + public ClusterServersConfig getClusterServersConfig() { return clusterServersConfig; } - protected void setClusterServersConfig(ClusterServersConfig clusterServersConfig) { + public void setClusterServersConfig(ClusterServersConfig clusterServersConfig) { this.clusterServersConfig = clusterServersConfig; } @@ -262,11 +262,11 @@ public class Config { return replicatedServersConfig; } - protected ReplicatedServersConfig getReplicatedServersConfig() { + public ReplicatedServersConfig getReplicatedServersConfig() { return replicatedServersConfig; } - protected void setReplicatedServersConfig(ReplicatedServersConfig replicatedServersConfig) { + public void setReplicatedServersConfig(ReplicatedServersConfig replicatedServersConfig) { this.replicatedServersConfig = replicatedServersConfig; } @@ -314,11 +314,11 @@ public class Config { return singleServerConfig; } - protected SingleServerConfig getSingleServerConfig() { + public SingleServerConfig getSingleServerConfig() { return singleServerConfig; } - protected void setSingleServerConfig(SingleServerConfig singleConnectionConfig) { + public void setSingleServerConfig(SingleServerConfig singleConnectionConfig) { this.singleServerConfig = singleConnectionConfig; } @@ -343,11 +343,11 @@ public class Config { return this.sentinelServersConfig; } - protected SentinelServersConfig getSentinelServersConfig() { + public SentinelServersConfig getSentinelServersConfig() { return sentinelServersConfig; } - protected void setSentinelServersConfig(SentinelServersConfig sentinelConnectionConfig) { + public void setSentinelServersConfig(SentinelServersConfig sentinelConnectionConfig) { this.sentinelServersConfig = sentinelConnectionConfig; } @@ -372,11 +372,11 @@ public class Config { return masterSlaveServersConfig; } - protected MasterSlaveServersConfig getMasterSlaveServersConfig() { + public MasterSlaveServersConfig getMasterSlaveServersConfig() { return masterSlaveServersConfig; } - protected void setMasterSlaveServersConfig(MasterSlaveServersConfig masterSlaveConnectionConfig) { + public void setMasterSlaveServersConfig(MasterSlaveServersConfig masterSlaveConnectionConfig) { this.masterSlaveServersConfig = masterSlaveConnectionConfig; } @@ -392,6 +392,14 @@ public class Config { return singleServerConfig != null; } + public boolean isReplicatedServersConfig() { + return replicatedServersConfig != null; + } + + public boolean isMasterSlaveServersConfig() { + return masterSlaveServersConfig != null; + } + public int getThreads() { return threads; }