From 08e97e82af383dc90f68bdc4c44e3fb64fa53a14 Mon Sep 17 00:00:00 2001 From: haozhibei <837948266@qq.com> Date: Thu, 29 Jul 2021 10:29:07 +0800 Subject: [PATCH 1/2] Update zookeeper-intro.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 微调Follower和Observer的表述,使其描述更统一,对比更明显 --- .../distributed-system/zookeeper/zookeeper-intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/system-design/distributed-system/zookeeper/zookeeper-intro.md b/docs/system-design/distributed-system/zookeeper/zookeeper-intro.md index 8178d303a48..f9b94eb2bcd 100644 --- a/docs/system-design/distributed-system/zookeeper/zookeeper-intro.md +++ b/docs/system-design/distributed-system/zookeeper/zookeeper-intro.md @@ -235,8 +235,8 @@ ZooKeeper 集群中的所有机器通过一个 **Leader 选举过程** 来选定 | 角色 | 说明 | | -------- | ------------------------------------------------------------ | | Leader | 为客户端提供读和写的服务,负责投票的发起和决议,更新系统状态。 | -| Follower | 为客户端提供读服务,如果是写服务则转发给 Leader。在选举过程中参与投票。 | -| Observer | 为客户端提供读服务器,如果是写服务则转发给 Leader。不参与选举过程中的投票,也不参与“过半写成功”策略。在不影响写性能的情况下提升集群的读性能。此角色于 ZooKeeper3.3 系列新增的角色。 | +| Follower | 为客户端提供读服务,如果是写服务则转发给 Leader。参与选举过程中的投票。 | +| Observer | 为客户端提供读服务,如果是写服务则转发给 Leader。不参与选举过程中的投票,也不参与“过半写成功”策略。在不影响写性能的情况下提升集群的读性能。此角色于 ZooKeeper3.3 系列新增的角色。 | 当 Leader 服务器出现网络中断、崩溃退出与重启等异常情况时,就会进入 Leader 选举过程,这个过程会选举产生新的 Leader 服务器。 From bfa4f7864f7a6c1716b8cccc2899fd5e57fc2435 Mon Sep 17 00:00:00 2001 From: xiaoshuguo <343905275@qq.com> Date: Thu, 29 Jul 2021 17:19:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Java=208=20=E6=96=B0=E7=89=B9=E6=80=A7=20?= =?UTF-8?q?=E4=BE=8B=E5=AD=90=E5=B0=8F=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/java/new-features/java8-common-new-features.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/java/new-features/java8-common-new-features.md b/docs/java/new-features/java8-common-new-features.md index 69a9b7f7ba0..f0630eff520 100644 --- a/docs/java/new-features/java8-common-new-features.md +++ b/docs/java/new-features/java8-common-new-features.md @@ -176,7 +176,7 @@ public interface Runnable{} ```java @FunctionalInterface -public interface LambdaFunctionalInterface { +public interface LambdaInterface { void f(); } //使用 @@ -221,7 +221,7 @@ public class LambdaClassSuper { } } -public class LambdaClass { +public class LambdaClass extends LambdaClassSuper { public static LambdaInterface staticF() { return null; } @@ -243,6 +243,7 @@ public class LambdaClass { //4. 构造方法调用 LambdaInterface tt = LambdaClassSuper::new; + } } ```