• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mybatis / redis-cache / 559

13 Apr 2025 12:38AM CUT coverage: 83.163%. Remained the same
559

push

github

web-flow
Merge pull request #301 from mybatis/renovate/junit5-monorepo

Update dependency org.junit.jupiter:junit-jupiter-engine to v5.12.2

51 of 80 branches covered (63.75%)

163 of 196 relevant lines covered (83.16%)

0.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.96
/src/main/java/org/mybatis/caches/redis/RedisConfig.java
1
/*
2
 *    Copyright 2015-2023 the original author or authors.
3
 *
4
 *    Licensed under the Apache License, Version 2.0 (the "License");
5
 *    you may not use this file except in compliance with the License.
6
 *    You may obtain a copy of the License at
7
 *
8
 *       https://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *    Unless required by applicable law or agreed to in writing, software
11
 *    distributed under the License is distributed on an "AS IS" BASIS,
12
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *    See the License for the specific language governing permissions and
14
 *    limitations under the License.
15
 */
16
package org.mybatis.caches.redis;
17

18
import javax.net.ssl.HostnameVerifier;
19
import javax.net.ssl.SSLParameters;
20
import javax.net.ssl.SSLSocketFactory;
21

22
import redis.clients.jedis.JedisPoolConfig;
23
import redis.clients.jedis.Protocol;
24

25
public class RedisConfig extends JedisPoolConfig {
1✔
26

27
  private String host = Protocol.DEFAULT_HOST;
1✔
28
  private int port = Protocol.DEFAULT_PORT;
1✔
29
  private int connectionTimeout = Protocol.DEFAULT_TIMEOUT;
1✔
30
  private int soTimeout = Protocol.DEFAULT_TIMEOUT;
1✔
31
  private String password;
32
  private int database = Protocol.DEFAULT_DATABASE;
1✔
33
  private String clientName;
34
  private boolean ssl;
35
  private SSLSocketFactory sslSocketFactory;
36
  private SSLParameters sslParameters;
37
  private HostnameVerifier hostnameVerifier;
38
  private Serializer serializer = JDKSerializer.INSTANCE;
1✔
39

40
  public boolean isSsl() {
41
    return ssl;
1✔
42
  }
43

44
  public void setSsl(boolean ssl) {
45
    this.ssl = ssl;
1✔
46
  }
1✔
47

48
  public SSLSocketFactory getSslSocketFactory() {
49
    return sslSocketFactory;
1✔
50
  }
51

52
  public void setSslSocketFactory(SSLSocketFactory sslSocketFactory) {
53
    this.sslSocketFactory = sslSocketFactory;
1✔
54
  }
1✔
55

56
  public SSLParameters getSslParameters() {
57
    return sslParameters;
1✔
58
  }
59

60
  public void setSslParameters(SSLParameters sslParameters) {
61
    this.sslParameters = sslParameters;
1✔
62
  }
1✔
63

64
  public HostnameVerifier getHostnameVerifier() {
65
    return hostnameVerifier;
1✔
66
  }
67

68
  public void setHostnameVerifier(HostnameVerifier hostnameVerifier) {
69
    this.hostnameVerifier = hostnameVerifier;
1✔
70
  }
1✔
71

72
  public String getHost() {
73
    return host;
1✔
74
  }
75

76
  public void setHost(String host) {
77
    if (host == null || host.isEmpty()) {
1!
78
      host = Protocol.DEFAULT_HOST;
×
79
    }
80
    this.host = host;
1✔
81
  }
1✔
82

83
  public int getPort() {
84
    return port;
1✔
85
  }
86

87
  public void setPort(int port) {
88
    this.port = port;
1✔
89
  }
1✔
90

91
  public String getPassword() {
92
    return password;
1✔
93
  }
94

95
  public void setPassword(String password) {
96
    if (password == null || password.isEmpty()) {
1!
97
      password = null;
1✔
98
    }
99
    this.password = password;
1✔
100
  }
1✔
101

102
  public int getDatabase() {
103
    return database;
1✔
104
  }
105

106
  public void setDatabase(int database) {
107
    this.database = database;
1✔
108
  }
1✔
109

110
  public String getClientName() {
111
    return clientName;
1✔
112
  }
113

114
  public void setClientName(String clientName) {
115
    if (clientName == null || clientName.isEmpty()) {
1!
116
      clientName = null;
1✔
117
    }
118
    this.clientName = clientName;
1✔
119
  }
1✔
120

121
  public int getConnectionTimeout() {
122
    return connectionTimeout;
1✔
123
  }
124

125
  public void setConnectionTimeout(int connectionTimeout) {
126
    this.connectionTimeout = connectionTimeout;
1✔
127
  }
1✔
128

129
  public int getSoTimeout() {
130
    return soTimeout;
1✔
131
  }
132

133
  public void setSoTimeout(int soTimeout) {
134
    this.soTimeout = soTimeout;
1✔
135
  }
1✔
136

137
  public Serializer getSerializer() {
138
    return serializer;
1✔
139
  }
140

141
  public void setSerializer(Serializer serializer) {
142
    this.serializer = serializer;
1✔
143
  }
1✔
144

145
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc