From a0738560044732949bb11bfe51ee083ef4589e8b Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Sun, 3 Mar 2024 09:39:26 -0800 Subject: [PATCH] copyright --- .../com/salesforce/apollo/context/Context.java | 16 ++++++++++++++++ .../apollo/context/DynamicContextImpl.java | 7 ++----- .../salesforce/apollo/context/StaticContext.java | 4 ++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/memberships/src/main/java/com/salesforce/apollo/context/Context.java b/memberships/src/main/java/com/salesforce/apollo/context/Context.java index 90013de68..14aca650d 100644 --- a/memberships/src/main/java/com/salesforce/apollo/context/Context.java +++ b/memberships/src/main/java/com/salesforce/apollo/context/Context.java @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2024, salesforce.com, inc. + * All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ package com.salesforce.apollo.context; import com.salesforce.apollo.cryptography.Digest; @@ -13,6 +19,16 @@ import java.util.function.Predicate; import java.util.stream.Stream; +/** + * Provides a Context for Membership and is uniquely identified by a Digest. Members may be either active or offline. + * The Context maintains a number of Rings (can be zero) that the Context provides for Firefly type consistent hash ring + * ordering operators. Each ring has a unique hash of each member, and thus each ring has a different ring order of the + * same membership set. Hashes for DynamicContext level operators include the ID of the ring. Hashes computed and cached + * for each member per ring include the ID of the enclosing DynamicContext. + * + * @param + * @author hal.hildebrand + */ public interface Context { static List uniqueSuccessors(Context context, Digest digest) { diff --git a/memberships/src/main/java/com/salesforce/apollo/context/DynamicContextImpl.java b/memberships/src/main/java/com/salesforce/apollo/context/DynamicContextImpl.java index 0b393730a..bf661865f 100644 --- a/memberships/src/main/java/com/salesforce/apollo/context/DynamicContextImpl.java +++ b/memberships/src/main/java/com/salesforce/apollo/context/DynamicContextImpl.java @@ -23,11 +23,8 @@ import static com.salesforce.apollo.context.Context.minMajority; /** - * Provides a DynamicContext for Membership and is uniquely identified by a Digest. Members may be either active or - * offline. The DynamicContext maintains a number of Rings (may be zero) that the DynamicContext provides for Firefly - * type consistent hash ring ordering operators. Each ring has a unique hash of each individual member, and thus each - * ring has a different ring order of the same membership set. Hashes for DynamicContext level operators include the ID - * of the ring. Hashes computed for each member, per ring include the ID of the enclosing DynamicContext. + * Provides a dynamic Context for Membership. Members can be active or inactive. Context membership is dynamic and + * members can be added or removed at any time. * * @author hal.hildebrand */ diff --git a/memberships/src/main/java/com/salesforce/apollo/context/StaticContext.java b/memberships/src/main/java/com/salesforce/apollo/context/StaticContext.java index c5a96e295..73c9db5de 100644 --- a/memberships/src/main/java/com/salesforce/apollo/context/StaticContext.java +++ b/memberships/src/main/java/com/salesforce/apollo/context/StaticContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, salesforce.com, inc. + * Copyright (c) 2024, salesforce.com, inc. * All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause @@ -19,7 +19,7 @@ import static com.salesforce.apollo.context.Context.minMajority; /** - * Static DynamicContext implementation + * Static Context implementation * * @author hal.hildebrand */