-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRedissonClientConfigProperties.java
More file actions
60 lines (57 loc) · 1.49 KB
/
Copy pathRedissonClientConfigProperties.java
File metadata and controls
60 lines (57 loc) · 1.49 KB
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
package com.yw.dynamicthreadpooltest.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* 说明
*
* @author: yuanwen
* @since: 2024/9/23
*/
@Data
@ConfigurationProperties(prefix = "redis.sdk.config", ignoreInvalidFields = true)
public class RedissonClientConfigProperties {
/**
* host:ip
*/
private String host;
/**
* 端口
*/
private int port;
/**
* 账密
*/
private String password;
/**
* 设置连接池的大小,默认为64
*/
private int poolSize = 64;
/**
* 设置连接池的最小空闲连接数,默认为10
*/
private int minIdleSize = 10;
/**
* 设置连接的最大空闲时间(单位:毫秒),超过该时间的空闲连接将被关闭,默认为10000
*/
private int idleTimeout = 10000;
/**
* 设置连接超时时间(单位:毫秒),默认为10000
*/
private int connectTimeout = 10000;
/**
* 设置连接重试次数,默认为3
*/
private int retryAttempts = 3;
/**
* 设置连接重试的间隔时间(单位:毫秒),默认为1000
*/
private int retryInterval = 1000;
/**
* 设置定期检查连接是否可用的时间间隔(单位:毫秒),默认为0,表示不进行定期检查
*/
private int pingInterval = 0;
/**
* 设置是否保持长连接,默认为true
*/
private boolean keepAlive = true;
}