From 2f8ef56626066f7f859c7ed77ca1c69950fd70b1 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Fri, 23 Jun 2023 09:36:08 +0100 Subject: [PATCH] add license information for Caffeine code used in FrequencySketch (#446) * add license information for Caffeine code used in FrequencySketch * fix grammar issue --- LICENSE | 6 ++++++ .../apache/pekko/util/FrequencySketch.scala | 18 +++++++++++++++++- legal/pekko-actor-jar-license.txt | 6 ++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 38953a2f09..ec2dc50f3e 100644 --- a/LICENSE +++ b/LICENSE @@ -311,6 +311,12 @@ For more information, please refer to --------------- +pekko-actor contains code in `org.apache.pekko.util.FrequencySketch.scala` which was based on code from +Caffeine which was developed under the Apache 2.0 license. +Copyright 2015 Ben Manes. All Rights Reserved. + +--------------- + pekko-cluster contains VectorClock.scala which is derived from code written by Coda Hale . He has agreed to allow us to use this code under an Apache 2.0 license diff --git a/actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala b/actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala index eb732d3abe..e54cf1a0b5 100644 --- a/actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala +++ b/actor/src/main/scala/org/apache/pekko/util/FrequencySketch.scala @@ -11,6 +11,22 @@ * Copyright (C) 2021-2022 Lightbend Inc. */ +/* + * Copyright 2015 Ben Manes. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.apache.pekko.util import org.apache.pekko.annotation.InternalApi @@ -253,7 +269,7 @@ private[pekko] object FastFrequencySketch { * so that constants can be used for improved efficiency. It also uses its own rehashing of item hash codes. * * The implementation is inspired by the approach used in the Caffeine caching library: - * https://github.com/ben-manes/caffeine + * https://github.com/ben-manes/caffeine/blob/a6be555f0f2a44d33a9d7e52ea923622e373ac7f/caffeine/src/main/java/com/github/benmanes/caffeine/cache/FrequencySketch.java * * @param width width of the count-min sketch (number of counters) * @param resetSize the size (number of counter increments) to apply the reset operation diff --git a/legal/pekko-actor-jar-license.txt b/legal/pekko-actor-jar-license.txt index 6079a23779..3a0e6d27b2 100644 --- a/legal/pekko-actor-jar-license.txt +++ b/legal/pekko-actor-jar-license.txt @@ -308,3 +308,9 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to + +--------------- + +pekko-actor contains code in `org.apache.pekko.util.FrequencySketch.scala` which was based on code from +Caffeine which was developed under the Apache 2.0 license. +Copyright 2015 Ben Manes. All Rights Reserved.