Skip to content

Commit ec7baba

Browse files
committed
Updated on comments
1 parent aa5e37d commit ec7baba

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private GenericObjectPoolConfig<?> getPoolConfig(Pool properties) {
147147
config.setMaxIdle(properties.getMaxIdle());
148148
config.setMinIdle(properties.getMinIdle());
149149
config.setTimeBetweenEvictionRunsMillis(
150-
properties.getIdleEvictPeriod().toMillis());
150+
properties.getTimeBetweenEvictionRuns().toMillis());
151151
if (properties.getMaxWait() != null) {
152152
config.setMaxWaitMillis(properties.getMaxWait().toMillis());
153153
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/RedisProperties.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ public static class Pool {
173173
* Target for the minimum number of idle connections to maintain in the pool. This
174174
* setting only has an effect if it is positive.
175175
*
176-
* This setting only has an effect if it is positive and `idleEvictPeriod` is
177-
* greater than zero.
176+
* This setting only has an effect if it is positive and `timeBetweenEvictionRuns`
177+
* is greater than zero.
178178
*/
179179
private int minIdle = 0;
180180

@@ -192,12 +192,12 @@ public static class Pool {
192192
private Duration maxWait = Duration.ofMillis(-1);
193193

194194
/**
195-
* Time of milliseconds to sleep between runs of the idle object evictor thread.
195+
* Time to sleep between runs of the idle object evictor thread.
196196
*
197197
* When positive, the idle object evictor thread starts. When non-positive, no
198198
* idle object evictor thread runs.
199199
*/
200-
private Duration idleEvictPeriod = Duration.ofMillis(-1);
200+
private Duration timeBetweenEvictionRuns = Duration.ofMillis(-1);
201201

202202
public int getMaxIdle() {
203203
return this.maxIdle;
@@ -231,12 +231,12 @@ public void setMaxWait(Duration maxWait) {
231231
this.maxWait = maxWait;
232232
}
233233

234-
public Duration getIdleEvictPeriod() {
235-
return this.idleEvictPeriod;
234+
public Duration getTimeBetweenEvictionRuns() {
235+
return this.timeBetweenEvictionRuns;
236236
}
237237

238-
public void setIdleEvictPeriod(Duration idleEvictPeriod) {
239-
this.idleEvictPeriod = idleEvictPeriod;
238+
public void setTimeBetweenEvictionRuns(Duration timeBetweenEvictionRuns) {
239+
this.timeBetweenEvictionRuns = timeBetweenEvictionRuns;
240240
}
241241

242242
}

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public void testRedisConfigurationWithPool() {
155155
"spring.redis.lettuce.pool.max-idle:4",
156156
"spring.redis.lettuce.pool.max-active:16",
157157
"spring.redis.lettuce.pool.max-wait:2000",
158-
"spring.redis.lettuce.pool.idle-evict-period:30000",
158+
"spring.redis.lettuce.pool.time-between-eviction-runs:30000",
159159
"spring.redis.lettuce.shutdown-timeout:1000").run((context) -> {
160160
LettuceConnectionFactory cf = context
161161
.getBean(LettuceConnectionFactory.class);

0 commit comments

Comments
 (0)