疯狂的狮子li
2021-07-04 c26073afeb59ff898bb46a59031728fb99985a32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
package com.ruoyi.framework.config.properties;
 
import lombok.Data;
import lombok.NoArgsConstructor;
import org.redisson.config.TransportMode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
 
import java.util.List;
 
/**
 * Redisson 配置属性
 *
 * @author Lion Li
 */
@Data
@Component
@ConfigurationProperties(prefix = "redisson")
public class RedissonProperties {
 
    /**
     * 线程池数量,默认值 = 当前处理核数量 * 2
     */
    private int threads;
 
    /**
     * Netty线程池数量,默认值 = 当前处理核数量 * 2
     */
    private int nettyThreads;
 
    /**
     * 传输模式
     */
    private TransportMode transportMode;
 
    /**
     * 单机服务配置
     */
    private SingleServerConfig singleServerConfig;
 
    /**
     * 缓存组
     */
    private List<CacheGroup> cacheGroup;
 
    @Data
    @NoArgsConstructor
    public static class SingleServerConfig {
 
        /**
         * 客户端名称
         */
        private String clientName;
 
        /**
         * 最小空闲连接数
         */
        private int connectionMinimumIdleSize;
 
        /**
         * 连接池大小
         */
        private int connectionPoolSize;
 
        /**
         * 连接空闲超时,单位:毫秒
         */
        private int idleConnectionTimeout;
 
        /**
         * 命令等待超时,单位:毫秒
         */
        private int timeout;
 
        /**
         * 如果尝试在此限制之内发送成功,则开始启用 timeout 计时。
         */
        private int retryAttempts;
 
        /**
         * 命令重试发送时间间隔,单位:毫秒
         */
        private int retryInterval;
 
        /**
         * 发布和订阅连接的最小空闲连接数
         */
        private int subscriptionConnectionMinimumIdleSize;
 
        /**
         * 发布和订阅连接池大小
         */
        private int subscriptionConnectionPoolSize;
 
        /**
         * 单个连接最大订阅数量
         */
        private int subscriptionsPerConnection;
 
        /**
         * DNS监测时间间隔,单位:毫秒
         */
        private int dnsMonitoringInterval;
 
    }
 
    @Data
    @NoArgsConstructor
    public static class CacheGroup {
 
        /**
         * 组id
         */
        private String groupId;
 
        /**
         * 组过期时间
         */
        private long ttl;
 
        /**
         * 组最大空闲时间
         */
        private long maxIdleTime;
 
        /**
         * 组最大长度
         */
        private int maxSize;
 
    }
 
}