From 305fc3134894dda4f5da060536159c449e56a233 Mon Sep 17 00:00:00 2001 From: Ahoo Wang Date: Thu, 3 Jun 2021 10:05:14 +0800 Subject: [PATCH] update README --- README.md | 6 +++--- README.zh-CN.md | 6 +++--- .../ahoo/cosky/core/listener/AbstractMessageListenable.java | 2 +- .../main/java/me/ahoo/cosky/mirror/NacosToCoskyMirror.java | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index babfbe3d..e5e94c51 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# CoSky On Redis (Service Discovery and Configuration Service) +# [CoSky](https://github.com/Ahoo-Wang/CoSky) On Redis (Service Discovery and Configuration Service) -> **Co**n**s**ul + S**ky** = **CoSky** +> **Co**n**s**ul + S**ky** = **[CoSky](https://github.com/Ahoo-Wang/CoSky)** > [中文文档](./README.zh-CN.md) -*CoSky* is a lightweight, low-cost service registration, service discovery, and configuration service SDK. By using +*[CoSky](https://github.com/Ahoo-Wang/CoSky)* is a lightweight, low-cost service registration, service discovery, and configuration service SDK. By using Redis in the existing infrastructure (I believe you have already deployed Redis), it doesn’t need to bring extra to the operation and maintenance deployment. Cost and burden. With the high performance of Redis, *CoSky* provides ultra-high TPS&QPS (10W+/s [JMH Benchmark](#jmh-benchmark)). *CoSky* combines the process cache strategy + * diff --git a/README.zh-CN.md b/README.zh-CN.md index 6f2dfc3a..aa3f06a0 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,8 +1,8 @@ -# CoSky 基于 Redis 的服务治理平台(服务注册/发现 & 配置中心) +# [CoSky](https://github.com/Ahoo-Wang/CoSky) 基于 Redis 的服务治理平台(服务注册/发现 & 配置中心) -> **Co**n**s**ul + S**ky** = **CoSky** +> **Co**n**s**ul + S**ky** = **[CoSky](https://github.com/Ahoo-Wang/CoSky)** -*CoSky* 是一个轻量级、低成本的服务注册、服务发现、 配置服务 SDK,通过使用现有基础设施中的 Redis (相信你已经部署了Redis),不用给运维部署带来额外的成本与负担。 +*[CoSky](https://github.com/Ahoo-Wang/CoSky)* 是一个轻量级、低成本的服务注册、服务发现、 配置服务 SDK,通过使用现有基础设施中的 Redis (相信你已经部署了Redis),不用给运维部署带来额外的成本与负担。 借助于 Redis 的高性能, *CoSky* 提供了超高TPS&QPS (10W+/s [JMH 基准测试](#jmh-benchmark))。*CoSky* 结合本地进程缓存策略 + *Redis PubSub* ,实现实时进程缓存刷新,兼具无与伦比的QPS性能、进程缓存与 Redis 的实时一致性。 diff --git a/cosky-core/src/main/java/me/ahoo/cosky/core/listener/AbstractMessageListenable.java b/cosky-core/src/main/java/me/ahoo/cosky/core/listener/AbstractMessageListenable.java index 100c9c8a..a6562ca1 100644 --- a/cosky-core/src/main/java/me/ahoo/cosky/core/listener/AbstractMessageListenable.java +++ b/cosky-core/src/main/java/me/ahoo/cosky/core/listener/AbstractMessageListenable.java @@ -67,7 +67,7 @@ protected CompletableFuture subscribe(Topic topic) { @Override public CompletableFuture removeListener(Topic topic, MessageListener messageListener) { AtomicReference resultFuture = new AtomicReference<>(CompletableFuture.completedFuture(null)); - var messageListeners = topicMapListener.compute(topic, (key, val) -> { + topicMapListener.compute(topic, (key, val) -> { if (Objects.isNull(val)) { if (log.isInfoEnabled()) { log.info("removeListener - topic[{}] not existed - Failure.", topic); diff --git a/cosky-mirror/src/main/java/me/ahoo/cosky/mirror/NacosToCoskyMirror.java b/cosky-mirror/src/main/java/me/ahoo/cosky/mirror/NacosToCoskyMirror.java index 45475fe4..38a7480b 100644 --- a/cosky-mirror/src/main/java/me/ahoo/cosky/mirror/NacosToCoskyMirror.java +++ b/cosky-mirror/src/main/java/me/ahoo/cosky/mirror/NacosToCoskyMirror.java @@ -88,7 +88,7 @@ public void nacosToCosky(String serviceId, Instance instance) { ServiceInstance coskyInstance = getCoskyInstanceFromNacos(serviceId, instance); coskyServiceRegistry.register(coskyInstance).exceptionally(throwable -> { log.error(throwable.getMessage(), throwable); - return null; + return Boolean.FALSE; }); } @@ -139,8 +139,9 @@ private NacosServiceChangedListener(String serviceId, List lastInstanc /** * callback event. - * @see NamingEvent + * * @param event event + * @see NamingEvent */ @Override public void onEvent(Event event) {