File tree 4 files changed +7
-6
lines changed
redis/src/main/java/io/kimmking/cache/redission
4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ port 26379
8
8
user default on nopass ~* +@all
9
9
dir "/Users/kimmking/kimmking/JavaCourseCodes/08cache/ha/conf"
10
10
sentinel config-epoch mymaster 5
11
- sentinel leader-epoch mymaster 5
11
+ sentinel leader-epoch mymaster 6
12
12
sentinel known-replica mymaster 127.0.0.1 6379
13
13
sentinel known-sentinel mymaster 127.0.0.1 26380 8d992c54df8f8677b0b345825f61fb733c73d14d
14
- sentinel current-epoch 5
14
+ sentinel current-epoch 6
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ port 26380
8
8
user default on nopass ~* +@all
9
9
dir "/Users/kimmking/kimmking/JavaCourseCodes/08cache/ha/conf"
10
10
sentinel config-epoch mymaster 5
11
- sentinel leader-epoch mymaster 5
11
+ sentinel leader-epoch mymaster 6
12
12
sentinel known-replica mymaster 127.0.0.1 6379
13
13
sentinel known-sentinel mymaster 127.0.0.1 26379 8d992c54df8f8677b0b345825f61fb733c73d14c
14
- sentinel current-epoch 5
14
+ sentinel current-epoch 6
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public class RedissionDemo {
13
13
@ SneakyThrows
14
14
public static void main (String [] args ) {
15
15
Config config = new Config ();
16
- config .useSingleServer ().setAddress ("redis://127.0.0.1:6379 " );
16
+ config .useSingleServer ().setAddress ("redis://127.0.0.1:6380 " );
17
17
//config.useSingleServer().setPassword("");
18
18
19
19
final RedissonClient client = Redisson .create (config );
@@ -38,6 +38,7 @@ public static void main(String[] args) {
38
38
Thread .sleep (2000 );
39
39
System .out .println (rmap .get ("rkey:10" ));
40
40
}
41
+
41
42
}
42
43
43
44
// 可参阅:https://www.jianshu.com/p/47fd7f86c848
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public class RedissionDemo1 {
10
10
11
11
public static void main (String [] args ) {
12
12
Config config = new Config ();
13
- config .useSingleServer ().setAddress ("redis://127.0.0.1:6379 " );
13
+ config .useSingleServer ().setAddress ("redis://127.0.0.1:6380 " );
14
14
//config.useSingleServer().setPassword("");
15
15
16
16
final RedissonClient client = Redisson .create (config );
You can’t perform that action at this time.
0 commit comments