Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmking committed Dec 30, 2020
1 parent 24aff72 commit bb818e2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions 08cache/ha/conf/sentinel0.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ port 26379
user default on nopass ~* +@all
dir "/Users/kimmking/kimmking/JavaCourseCodes/08cache/ha/conf"
sentinel config-epoch mymaster 5
sentinel leader-epoch mymaster 5
sentinel leader-epoch mymaster 6
sentinel known-replica mymaster 127.0.0.1 6379
sentinel known-sentinel mymaster 127.0.0.1 26380 8d992c54df8f8677b0b345825f61fb733c73d14d
sentinel current-epoch 5
sentinel current-epoch 6
4 changes: 2 additions & 2 deletions 08cache/ha/conf/sentinel1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ port 26380
user default on nopass ~* +@all
dir "/Users/kimmking/kimmking/JavaCourseCodes/08cache/ha/conf"
sentinel config-epoch mymaster 5
sentinel leader-epoch mymaster 5
sentinel leader-epoch mymaster 6
sentinel known-replica mymaster 127.0.0.1 6379
sentinel known-sentinel mymaster 127.0.0.1 26379 8d992c54df8f8677b0b345825f61fb733c73d14c
sentinel current-epoch 5
sentinel current-epoch 6
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class RedissionDemo {
@SneakyThrows
public static void main(String[] args) {
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
config.useSingleServer().setAddress("redis://127.0.0.1:6380");
//config.useSingleServer().setPassword("");

final RedissonClient client = Redisson.create(config);
Expand All @@ -38,6 +38,7 @@ public static void main(String[] args) {
Thread.sleep(2000);
System.out.println(rmap.get("rkey:10"));
}

}

// 可参阅:https://www.jianshu.com/p/47fd7f86c848
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class RedissionDemo1 {

public static void main(String[] args) {
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
config.useSingleServer().setAddress("redis://127.0.0.1:6380");
//config.useSingleServer().setPassword("");

final RedissonClient client = Redisson.create(config);
Expand Down

0 comments on commit bb818e2

Please sign in to comment.