Skip to content

Commit 469a35e

Browse files
author
codeba
committed
perf: Performance optimization and pom version upgrade
1 parent 547e1ad commit 469a35e

File tree

13 files changed

+1681
-299
lines changed

13 files changed

+1681
-299
lines changed

pom.xml

Lines changed: 2 additions & 2 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.0.0</version>
25+
<version>2024.1.0</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.0.0</redis-keeper.version>
46+
<redis-keeper.version>2024.1.0</redis-keeper.version>
4747
<redisson.version>3.15.5</redisson.version>
4848

4949
<spring.version>5.3.27</spring.version>

redis-keeper-core/pom.xml

Lines changed: 1 addition & 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.0.0</version>
23+
<version>2024.1.0</version>
2424
</parent>
2525

2626
<artifactId>redis-keeper-core</artifactId>

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

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public interface CacheTemplate {
176176
* @param key the key
177177
* @param offset the offset
178178
* @param value the value
179-
* @return the bit
179+
* @return the bit: the original bit value stored at offset.
180180
*/
181181
boolean setBit(String key, long offset, boolean value);
182182

@@ -426,7 +426,7 @@ public interface CacheTemplate {
426426
* @param order the order
427427
* @return the completable future
428428
*/
429-
CompletableFuture<List<Object>> geosSearchAsync(String key, double longitude, double latitude, double width, double height, String geoUnit, int count, String order);
429+
CompletableFuture<List<Object>> geoSearchAsync(String key, double longitude, double latitude, double width, double height, String geoUnit, int count, String order);
430430

431431
/**
432432
* Geo search list.
@@ -530,7 +530,7 @@ public interface CacheTemplate {
530530
* @param order the order
531531
* @return the completable future
532532
*/
533-
CompletableFuture<List<Object>> geosSearchAsync(String key, Object member, double width, double height, String geoUnit, int count, String order);
533+
CompletableFuture<List<Object>> geoSearchAsync(String key, Object member, double width, double height, String geoUnit, int count, String order);
534534

535535
/**
536536
* Geo search with distance map.
@@ -584,7 +584,7 @@ public interface CacheTemplate {
584584
* @param order the order
585585
* @return the completable future
586586
*/
587-
CompletableFuture<Map<Object, Double>> geosSearchWithDistanceAsync(String key, double longitude, double latitude, double radius, String geoUnit, int count, String order);
587+
CompletableFuture<Map<Object, Double>> geoSearchWithDistanceAsync(String key, double longitude, double latitude, double radius, String geoUnit, int count, String order);
588588

589589
/**
590590
* Geo search with distance map.
@@ -734,20 +734,6 @@ public interface CacheTemplate {
734734
*/
735735
Map<Object, Double> geoSearchWithDistance(String key, Object member, double width, double height, String geoUnit, int count, String order);
736736

737-
/**
738-
* Geo search with distance async completable future.
739-
*
740-
* @param key the key
741-
* @param member the member
742-
* @param width the width
743-
* @param height the height
744-
* @param geoUnit the geo unit
745-
* @param count the count
746-
* @param order the order
747-
* @return the completable future
748-
*/
749-
CompletableFuture<Map<Object, Double>> geoSearchWithDistanceAsync(String key, Object member, double width, double height, String geoUnit, int count, String order);
750-
751737
/**
752738
* H del map.
753739
*
@@ -775,6 +761,15 @@ public interface CacheTemplate {
775761
*/
776762
Map<String, Boolean> hExists(String key, String... fields);
777763

764+
/**
765+
* H exists async map.
766+
*
767+
* @param key the key
768+
* @param fields the fields
769+
* @return the map
770+
*/
771+
Map<String, CompletableFuture<Boolean>> hExistsAsync(String key, String... fields);
772+
778773
/**
779774
* H get optional.
780775
*
@@ -1273,7 +1268,7 @@ public interface CacheTemplate {
12731268
CompletableFuture<Object> brPopAsync(String key, long timeout, TimeUnit unit, String... otherKeys);
12741269

12751270
/**
1276-
* Br popl push optional.
1271+
* Br pop push optional.
12771272
*
12781273
* @param source the source
12791274
* @param destination the destination
@@ -1282,18 +1277,18 @@ public interface CacheTemplate {
12821277
* @return the optional
12831278
* @throws InterruptedException the interrupted exception
12841279
*/
1285-
Optional<Object> brPoplPush(String source, String destination, long timeout, TimeUnit unit) throws InterruptedException;
1280+
Optional<Object> brPopLPush(String source, String destination, long timeout, TimeUnit unit) throws InterruptedException;
12861281

12871282
/**
1288-
* Br popl push async completable future.
1283+
* Br pop push async completable future.
12891284
*
12901285
* @param source the source
12911286
* @param destination the destination
12921287
* @param timeout the timeout
12931288
* @param unit the unit
12941289
* @return the completable future
12951290
*/
1296-
CompletableFuture<Object> brPoplPushAsync(String source, String destination, long timeout, TimeUnit unit);
1291+
CompletableFuture<Object> brPopLPushAsync(String source, String destination, long timeout, TimeUnit unit);
12971292

12981293
/**
12991294
* L index optional.
@@ -1337,15 +1332,15 @@ public interface CacheTemplate {
13371332
CompletableFuture<Integer> lInsertAsync(String key, boolean before, Object pivot, Object element);
13381333

13391334
/**
1340-
* Llen int.
1335+
* L len int.
13411336
*
13421337
* @param key the key
13431338
* @return the int
13441339
*/
13451340
int llen(String key);
13461341

13471342
/**
1348-
* Llen async completable future.
1343+
* L len async completable future.
13491344
*
13501345
* @param key the key
13511346
* @return the completable future
@@ -1399,15 +1394,6 @@ public interface CacheTemplate {
13991394
*/
14001395
int lPush(String key, Object... elements);
14011396

1402-
/**
1403-
* L push async completable future.
1404-
*
1405-
* @param key the key
1406-
* @param elements the elements
1407-
* @return the completable future
1408-
*/
1409-
CompletableFuture<Void> lPushAsync(String key, Object... elements);
1410-
14111397
/**
14121398
* L push x int.
14131399
*
@@ -1521,22 +1507,22 @@ public interface CacheTemplate {
15211507
CompletableFuture<List<Object>> rPopAsync(String key, int count);
15221508

15231509
/**
1524-
* R popl push optional.
1510+
* R pop l push optional.
15251511
*
15261512
* @param source the source
15271513
* @param destination the destination
15281514
* @return the optional
15291515
*/
1530-
Optional<Object> rPoplPush(String source, String destination);
1516+
Optional<Object> rPopLPush(String source, String destination);
15311517

15321518
/**
1533-
* R popl push async completable future.
1519+
* R pop l push async completable future.
15341520
*
15351521
* @param source the source
15361522
* @param destination the destination
15371523
* @return the completable future
15381524
*/
1539-
CompletableFuture<Object> rPoplPushAsync(String source, String destination);
1525+
CompletableFuture<Object> rPopLPushAsync(String source, String destination);
15401526

15411527
/**
15421528
* R push boolean.
@@ -2353,7 +2339,6 @@ public interface CacheTemplate {
23532339
*/
23542340
CompletableFuture<Object> zmPopAsync(String key, boolean min);
23552341

2356-
23572342
/**
23582343
* Zm pop optional.
23592344
*
@@ -2929,6 +2914,14 @@ public interface CacheTemplate {
29292914
*/
29302915
Optional<Object> get(String key);
29312916

2917+
/**
2918+
* Gets object.
2919+
*
2920+
* @param key the key
2921+
* @return the object
2922+
*/
2923+
Optional<Object> getObject(String key);
2924+
29322925
/**
29332926
* Gets async.
29342927
*
@@ -2937,6 +2930,14 @@ public interface CacheTemplate {
29372930
*/
29382931
CompletableFuture<Object> getAsync(String key);
29392932

2933+
/**
2934+
* Gets object async.
2935+
*
2936+
* @param key the key
2937+
* @return the object async
2938+
*/
2939+
CompletableFuture<Object> getObjectAsync(String key);
2940+
29402941
/**
29412942
* Gets del.
29422943
*
@@ -3083,7 +3084,7 @@ public interface CacheTemplate {
30833084
* @param key the key
30843085
* @param value the value
30853086
*/
3086-
void set(String key, Object value);
3087+
void setObject(String key, Object value);
30873088

30883089
/**
30893090
* Sets async.
@@ -3092,7 +3093,7 @@ public interface CacheTemplate {
30923093
* @param value the value
30933094
* @return the async
30943095
*/
3095-
CompletableFuture<Void> setAsync(String key, Object value);
3096+
CompletableFuture<Void> setObjectAsync(String key, Object value);
30963097

30973098
/**
30983099
* M get map.

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.0.0</version>
30+
<version>2024.1.0</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.0.0</version>
23+
<version>2024.1.0</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.0.0</version>
51+
<version>2024.1.0</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.0.0</version>
59+
<version>2024.1.0</version>
6060
</dependency>
6161

6262
<dependency>

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.0.0</version>
23+
<version>2024.1.0</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.0.0</version>
40+
<version>2024.1.0</version>
4141
</dependency>
4242

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

4949
<dependency>

redis-keeper-spring-boot-starter/pom.xml

Lines changed: 1 addition & 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.0.0</version>
23+
<version>2024.1.0</version>
2424
</parent>
2525

2626
<artifactId>redis-keeper-spring-boot-starter</artifactId>

redis-keeper-spring-boot3-starter/pom.xml

Lines changed: 1 addition & 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.0.0</version>
23+
<version>2024.1.0</version>
2424
</parent>
2525

2626
<artifactId>redis-keeper-spring-boot3-starter</artifactId>

redis-keeper-spring/pom.xml

Lines changed: 1 addition & 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.0.0</version>
23+
<version>2024.1.0</version>
2424
</parent>
2525

2626
<artifactId>redis-keeper-spring</artifactId>

0 commit comments

Comments
 (0)