Skip to content

Commit 3ceef59

Browse files
author
codeba
committed
Merge remote-tracking branch 'origin/develop-refresh'
# Conflicts: # README.md # README_zh.md # pom.xml # redis-keeper-core/pom.xml # redis-keeper-example/pom.xml # redis-keeper-example/redis-keeper-example-springboot/pom.xml # redis-keeper-example/redis-keeper-example-springcloud/pom.xml # redis-keeper-example/redis-keeper-example-standalone/pom.xml # redis-keeper-spring-boot-starter/pom.xml # redis-keeper-spring-boot3-starter/pom.xml # redis-keeper-spring/pom.xml # redis-keeper-support/pom.xml
2 parents 9ab8e13 + 15d36e0 commit 3ceef59

File tree

23 files changed

+424
-74
lines changed

23 files changed

+424
-74
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,26 @@
2525
<dependency>
2626
<groupId>org.codeba</groupId>
2727
<artifactId>redis-keeper-core</artifactId>
28-
<version>2024.2.1</version>
28+
<version>2024.2.2</version>
2929
</dependency>
3030

3131
<dependency>
3232
<groupId>org.codeba</groupId>
3333
<artifactId>redis-keeper-support</artifactId>
34-
<version>2024.2.1</version>
34+
<version>2024.2.2</version>
3535
</dependency>
3636

3737
#### Gradle
3838

39-
implementation group: 'org.codeba', name: 'redis-keeper-core', version: '2024.2.1'
39+
implementation group: 'org.codeba', name: 'redis-keeper-core', version: '2024.2.2'
4040

41-
implementation group: 'org.codeba', name: 'redis-keeper-support', version: '2024.2.1'
41+
implementation group: 'org.codeba', name: 'redis-keeper-support', version: '2024.2.2'
4242

4343
#### Sbt
4444

45-
libraryDependencies += "org.codeba" % "redis-keeper-core" % "2024.2.1"
45+
libraryDependencies += "org.codeba" % "redis-keeper-core" % "2024.2.2"
4646

47-
libraryDependencies += "org.codeba" % "redis-keeper-support" % "2024.2.1"
47+
libraryDependencies += "org.codeba" % "redis-keeper-support" % "2024.2.2"
4848

4949

5050
#### Java
@@ -100,7 +100,7 @@ Optional<CacheTemplate> randomedTemplate = provider.randomTemplate("ds2");
100100
<dependency>
101101
<groupId>org.codeba</groupId>
102102
<artifactId>redis-keeper-spring-boot-starter</artifactId>
103-
<version>2024.2.1</version>
103+
<version>2024.2.2</version>
104104
</dependency>
105105
```
106106

@@ -243,7 +243,7 @@ public class AppTest {
243243
<dependency>
244244
<groupId>org.codeba</groupId>
245245
<artifactId>redis-keeper-spring-boot-starter</artifactId>
246-
<version>2024.2.1</version>
246+
<version>2024.2.2</version>
247247
</dependency>
248248
```
249249

@@ -337,7 +337,7 @@ public class AppTest {
337337
<dependency>
338338
<groupId>org.codeba</groupId>
339339
<artifactId>redis-keeper-spring-boot-starter</artifactId>
340-
<version>2024.2.1</version>
340+
<version>2024.2.2</version>
341341
</dependency>
342342
```
343343

README_zh.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,26 @@
2525
<dependency>
2626
<groupId>org.codeba</groupId>
2727
<artifactId>redis-keeper-core</artifactId>
28-
<version>2024.2.1</version>
28+
<version>2024.2.2</version>
2929
</dependency>
3030

3131
<dependency>
3232
<groupId>org.codeba</groupId>
3333
<artifactId>redis-keeper-support</artifactId>
34-
<version>2024.2.1</version>
34+
<version>2024.2.2</version>
3535
</dependency>
3636

3737
#### Gradle
3838

39-
implementation group: 'org.codeba', name: 'redis-keeper-core', version: '2024.2.1'
39+
implementation group: 'org.codeba', name: 'redis-keeper-core', version: '2024.2.2'
4040

41-
implementation group: 'org.codeba', name: 'redis-keeper-support', version: '2024.2.1'
41+
implementation group: 'org.codeba', name: 'redis-keeper-support', version: '2024.2.2'
4242

4343
#### Sbt
4444

45-
libraryDependencies += "org.codeba" % "redis-keeper-core" % "2024.2.1"
45+
libraryDependencies += "org.codeba" % "redis-keeper-core" % "2024.2.2"
4646

47-
libraryDependencies += "org.codeba" % "redis-keeper-support" % "2024.2.1"
47+
libraryDependencies += "org.codeba" % "redis-keeper-support" % "2024.2.2"
4848

4949

5050
#### Java
@@ -100,7 +100,7 @@ Optional<CacheTemplate> randomedTemplate = provider.randomTemplate("ds2");
100100
<dependency>
101101
<groupId>org.codeba</groupId>
102102
<artifactId>redis-keeper-spring-boot-starter</artifactId>
103-
<version>2024.2.1</version>
103+
<version>2024.2.2</version>
104104
</dependency>
105105
```
106106

@@ -244,7 +244,7 @@ public class AppTest {
244244
<dependency>
245245
<groupId>org.codeba</groupId>
246246
<artifactId>redis-keeper-spring-boot-starter</artifactId>
247-
<version>2024.2.1</version>
247+
<version>2024.2.2</version>
248248
</dependency>
249249
```
250250

@@ -339,7 +339,7 @@ public class AppTest {
339339
<dependency>
340340
<groupId>org.codeba</groupId>
341341
<artifactId>redis-keeper-spring-boot-starter</artifactId>
342-
<version>2024.2.1</version>
342+
<version>2024.2.2</version>
343343
</dependency>
344344
```
345345

pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<groupId>org.codeba</groupId>
2424
<artifactId>redis-keeper</artifactId>
25-
<version>2024.2.1</version>
25+
<version>2024.2.2</version>
2626

2727
<name>redis-keeper</name>
2828
<description>Redis-keeper is a lightweight multi-data source management tool for redis.</description>
@@ -43,7 +43,7 @@
4343
<maven.compiler.target>8</maven.compiler.target>
4444
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4545

46-
<redis-keeper.version>2024.2.1</redis-keeper.version>
46+
<redis-keeper.version>2024.2.2</redis-keeper.version>
4747
<redisson.version>3.35.0</redisson.version>
4848

4949
<spring.version>5.3.27</spring.version>
@@ -242,11 +242,10 @@
242242
<plugin>
243243
<groupId>org.sonatype.central</groupId>
244244
<artifactId>central-publishing-maven-plugin</artifactId>
245-
<version>0.3.0</version>
245+
<version>0.7.0</version>
246246
<extensions>true</extensions>
247247
<configuration>
248248
<publishingServerId>ossrh</publishingServerId>
249-
<tokenAuth>true</tokenAuth>
250249
<autoPublish>true</autoPublish>
251250
</configuration>
252251
</plugin>

redis-keeper-core/pom.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>org.codeba</groupId>
2222
<artifactId>redis-keeper</artifactId>
23-
<version>2024.2.1</version>
23+
<version>2024.2.2</version>
2424
</parent>
2525

2626
<artifactId>redis-keeper-core</artifactId>
@@ -34,4 +34,23 @@
3434
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3535
</properties>
3636

37+
<build>
38+
<plugins>
39+
<!-- Javadoc -->
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-javadoc-plugin</artifactId>
43+
<version>2.9.1</version>
44+
<executions>
45+
<execution>
46+
<phase>package</phase>
47+
<goals>
48+
<goal>jar</goal>
49+
</goals>
50+
</execution>
51+
</executions>
52+
</plugin>
53+
</plugins>
54+
</build>
55+
3756
</project>

redis-keeper-core/src/main/java/org/codeba/redis/keeper/core/CacheTemplate.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,9 @@ public interface CacheTemplate extends KBitSet, KGeneric, KGeo, KMap, KHyperLogL
6565
*/
6666
CompletableFuture<List<?>> pipelineWithResponsesAsync(Consumer<KBatch> batchConsumer);
6767

68+
/**
69+
* Destroy.
70+
*/
71+
void destroy();
72+
6873
}

redis-keeper-example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
<groupId>org.codeba</groupId>
2929
<artifactId>redis-keeper-example</artifactId>
30-
<version>2024.2.1</version>
30+
<version>2024.2.2</version>
3131

3232
<packaging>pom</packaging>
3333

redis-keeper-example/redis-keeper-example-springboot/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>org.codeba</groupId>
2222
<artifactId>redis-keeper-example</artifactId>
23-
<version>2024.2.1</version>
23+
<version>2024.2.2</version>
2424
</parent>
2525

2626
<artifactId>redis-keeper-example-springboot</artifactId>
@@ -48,7 +48,7 @@
4848
<dependency>
4949
<groupId>org.codeba</groupId>
5050
<artifactId>redis-keeper-spring-boot-starter</artifactId>
51-
<version>2024.2.1</version>
51+
<version>2024.2.2</version>
5252
</dependency>
5353

5454
<dependency>

redis-keeper-example/redis-keeper-example-springcloud/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<dependency>
5757
<groupId>org.codeba</groupId>
5858
<artifactId>redis-keeper-spring-boot-starter</artifactId>
59-
<version>2024.2.1</version>
59+
<version>2024.2.2</version>
6060
</dependency>
6161

6262
<dependency>

redis-keeper-example/redis-keeper-example-springcloud/src/main/java/org/codeba/redis/keeper/springcloud/TestController.java

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@
1717
package org.codeba.redis.keeper.springcloud;
1818

1919
import lombok.RequiredArgsConstructor;
20+
import lombok.extern.slf4j.Slf4j;
2021
import org.codeba.redis.keeper.core.CacheTemplate;
2122
import org.codeba.redis.keeper.core.CacheTemplateProvider;
2223
import org.springframework.web.bind.annotation.RequestMapping;
2324
import org.springframework.web.bind.annotation.RestController;
2425

2526
import java.util.Optional;
27+
import java.util.concurrent.CompletableFuture;
2628

2729
/**
2830
* The type Test controller.
2931
*
3032
* @author codeba
3133
*/
34+
@Slf4j
3235
@RestController
3336
@RequiredArgsConstructor
3437
public class TestController {
@@ -42,12 +45,38 @@ public class TestController {
4245
* Test refresh.
4346
*/
4447
@RequestMapping("/refresh")
45-
public void testRefresh() {
46-
final Optional<CacheTemplate> templateOptional = provider.getTemplate("ds1");
47-
templateOptional.ifPresent(cacheTemplate -> {
48-
cacheTemplate.set("foo", "bar");
49-
cacheTemplate.del("foo");
48+
public boolean testRefresh() {
49+
final long start = System.currentTimeMillis();
50+
51+
final CompletableFuture<Void> f1 = CompletableFuture.runAsync(() -> {
52+
for (int i = 0; i < 100000; i++) {
53+
final Optional<CacheTemplate> templateOptional = provider.getTemplate("ds4");
54+
templateOptional.ifPresent(cacheTemplate -> {
55+
cacheTemplate.incr("testRefresh");
56+
});
57+
}
58+
});
59+
final CompletableFuture<Void> f2 = CompletableFuture.runAsync(() -> {
60+
for (int i = 0; i < 100000; i++) {
61+
final Optional<CacheTemplate> templateOptional = provider.getTemplate("ds4");
62+
templateOptional.ifPresent(cacheTemplate -> {
63+
cacheTemplate.incr("testRefresh");
64+
});
65+
}
66+
});
67+
final CompletableFuture<Void> f3 = CompletableFuture.runAsync(() -> {
68+
for (int i = 0; i < 100000; i++) {
69+
final Optional<CacheTemplate> templateOptional = provider.getTemplate("ds4");
70+
templateOptional.ifPresent(cacheTemplate -> {
71+
cacheTemplate.incr("testRefresh");
72+
});
73+
}
5074
});
75+
76+
CompletableFuture.allOf(f1, f2, f3).join();
77+
log.info("cost time: {}", (System.currentTimeMillis() - start));
78+
79+
return true;
5180
}
5281

5382

redis-keeper-example/redis-keeper-example-standalone/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<parent>
2121
<groupId>org.codeba</groupId>
2222
<artifactId>redis-keeper-example</artifactId>
23-
<version>2024.2.1</version>
23+
<version>2024.2.2</version>
2424
</parent>
2525

2626
<artifactId>redis-keeper-example-standalone</artifactId>
@@ -37,13 +37,13 @@
3737
<dependency>
3838
<groupId>org.codeba</groupId>
3939
<artifactId>redis-keeper-core</artifactId>
40-
<version>2024.2.1</version>
40+
<version>2024.2.2</version>
4141
</dependency>
4242

4343
<dependency>
4444
<groupId>org.codeba</groupId>
4545
<artifactId>redis-keeper-support</artifactId>
46-
<version>2024.2.1</version>
46+
<version>2024.2.2</version>
4747
</dependency>
4848

4949
<dependency>

0 commit comments

Comments
 (0)