This is an automated email from the ASF dual-hosted git repository. fanningpj pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push: new a4199b8a9c remove deprecated code from distributed-data (#1965) a4199b8a9c is described below commit a4199b8a9cd2f878478045b1950c48e7022acaab Author: PJ Fanning <pjfann...@users.noreply.github.com> AuthorDate: Thu Jul 31 08:30:50 2025 +0100 remove deprecated code from distributed-data (#1965) * remove deprecated code from distributed-data * Create remove-deprecated-methods.excludes --- .../ddata/protobuf/msg/ReplicatedDataMessages.java | 20 --- .../remove-deprecated-methods.excludes | 57 +++++++ .../org/apache/pekko/cluster/ddata/GSet.scala | 3 - .../org/apache/pekko/cluster/ddata/GCounter.scala | 7 - .../org/apache/pekko/cluster/ddata/LWWMap.scala | 39 ----- .../apache/pekko/cluster/ddata/LWWRegister.scala | 31 ---- .../org/apache/pekko/cluster/ddata/ORMap.scala | 34 ---- .../apache/pekko/cluster/ddata/ORMultiMap.scala | 48 +----- .../org/apache/pekko/cluster/ddata/ORSet.scala | 22 --- .../org/apache/pekko/cluster/ddata/PNCounter.scala | 31 ---- .../apache/pekko/cluster/ddata/PNCounterMap.scala | 23 --- .../apache/pekko/cluster/ddata/Replicator.scala | 179 --------------------- .../apache/pekko/cluster/ddata/VersionVector.scala | 7 - 13 files changed, 58 insertions(+), 443 deletions(-) diff --git a/distributed-data/src/main/java/org/apache/pekko/cluster/ddata/protobuf/msg/ReplicatedDataMessages.java b/distributed-data/src/main/java/org/apache/pekko/cluster/ddata/protobuf/msg/ReplicatedDataMessages.java index bbe18022b7..d7c6678393 100644 --- a/distributed-data/src/main/java/org/apache/pekko/cluster/ddata/protobuf/msg/ReplicatedDataMessages.java +++ b/distributed-data/src/main/java/org/apache/pekko/cluster/ddata/protobuf/msg/ReplicatedDataMessages.java @@ -84,16 +84,6 @@ public final class ReplicatedDataMessages { return value; } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ORSetDeltaOp valueOf(int value) { - return forNumber(value); - } - /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. @@ -206,16 +196,6 @@ public final class ReplicatedDataMessages { return value; } - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ORMapDeltaOp valueOf(int value) { - return forNumber(value); - } - /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. diff --git a/distributed-data/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes b/distributed-data/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes new file mode 100644 index 0000000000..a83d286dd8 --- /dev/null +++ b/distributed-data/src/main/mima-filters/2.0.x.backwards.excludes/remove-deprecated-methods.excludes @@ -0,0 +1,57 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +# Remove deprecated methods +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.GCounter.+") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.GCounter.increment") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.GCounter.increment$default$2") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.LWWMap.+") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.LWWMap.put*") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.LWWMap.-") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.LWWMap.remove") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.LWWRegister.create") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.LWWRegister.apply*") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.LWWRegister.withValue*") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMap.+") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMap.put") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMap.updated") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMap.update") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMap.-") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMap.remove") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMultiMap.+") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMultiMap.put") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMultiMap.-") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMultiMap.remove") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMultiMap.addBinding") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMultiMap.removeBinding") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORMultiMap.replaceBinding") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORSet.+") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORSet.add") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORSet.-") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORSet.remove") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ORSet.clear") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.PNCounter.+") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.PNCounter.increment*") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.PNCounter.-") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.PNCounter.decrement*") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.PNCounterMap.increment") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.PNCounterMap.decrement*") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.PNCounterMap.remove") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.PNCounterMap.-") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.ReplicatorSettings.this") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.VersionVector.+") +ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.cluster.ddata.VersionVector.increment") diff --git a/distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala b/distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala index 839938fff0..d6fb966ab1 100644 --- a/distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala +++ b/distributed-data/src/main/scala-2/org/apache/pekko/cluster/ddata/GSet.scala @@ -97,9 +97,6 @@ final case class GSet[A] private (elements: Set[A])(override val delta: Option[G override def toString: String = s"G$elements" def copy(e: Set[A]) = new GSet[A](e)(delta) - - @deprecated("Kept for binary compatibility", since = "Akka 2.6.16") - private[ddata] def copy$default$1(): Set[A] = elements } object GSetKey { diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/GCounter.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/GCounter.scala index cd7ffe6310..7080d99e17 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/GCounter.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/GCounter.scala @@ -17,7 +17,6 @@ import java.math.BigInteger import org.apache.pekko import pekko.annotation.InternalApi -import pekko.cluster.Cluster import pekko.cluster.UniqueAddress object GCounter { @@ -84,18 +83,12 @@ final class GCounter private[pekko] ( */ def :+(n: Long)(implicit node: SelfUniqueAddress): GCounter = increment(node.uniqueAddress, n) - @deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def +(n: Long)(implicit node: Cluster): GCounter = increment(node.selfUniqueAddress, n) - /** * Increment the counter with the delta `n` specified. * The delta `n` must be zero or positive. */ def increment(node: SelfUniqueAddress, n: Long): GCounter = increment(node.uniqueAddress, n) - @deprecated("Use `increment` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def increment(node: Cluster, n: Long = 1): GCounter = increment(node.selfUniqueAddress, n) - /** * INTERNAL API */ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWMap.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWMap.scala index 13fe25345c..4558a334a6 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWMap.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWMap.scala @@ -15,7 +15,6 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko import pekko.annotation.InternalApi -import pekko.cluster.Cluster import pekko.cluster.UniqueAddress import pekko.cluster.ddata.ORMap.ZeroTag @@ -105,22 +104,12 @@ final class LWWMap[A, B] private[pekko] (private[pekko] val underlying: ORMap[A, put(node, key, value) } - @deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def +(entry: (A, B))(implicit node: Cluster): LWWMap[A, B] = { - val (key, value) = entry - put(node, key, value) - } - /** * Adds an entry to the map */ def put(node: SelfUniqueAddress, key: A, value: B): LWWMap[A, B] = put(node.uniqueAddress, key, value, defaultClock[B]) - @deprecated("Use `put` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def put(node: Cluster, key: A, value: B): LWWMap[A, B] = - put(node.selfUniqueAddress, key, value, defaultClock[B]) - /** * Adds an entry to the map. * @@ -132,22 +121,6 @@ final class LWWMap[A, B] private[pekko] (private[pekko] val underlying: ORMap[A, def put(node: SelfUniqueAddress, key: A, value: B, clock: Clock[B]): LWWMap[A, B] = put(node.uniqueAddress, key, value, clock) - @deprecated("Use `put` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def put(node: Cluster, key: A, value: B, clock: Clock[B]): LWWMap[A, B] = - put(node.selfUniqueAddress, key, value, clock) - - /** - * Adds an entry to the map. - * - * You can provide your `clock` implementation instead of using timestamps based - * on `System.currentTimeMillis()` time. The timestamp can for example be an - * increasing version number from a database record that is used for optimistic - * concurrency control. - */ - @deprecated("Use `put` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def put(key: A, value: B)(implicit node: Cluster, clock: Clock[B] = defaultClock[B]): LWWMap[A, B] = - put(node.selfUniqueAddress, key, value, clock) - /** * INTERNAL API */ @@ -159,14 +132,6 @@ final class LWWMap[A, B] private[pekko] (private[pekko] val underlying: ORMap[A, new LWWMap(underlying.put(node, key, newRegister)) } - /** - * Removes an entry from the map. - * Note that if there is a conflicting update on another node the entry will - * not be removed after merge. - */ - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def -(key: A)(implicit node: Cluster): LWWMap[A, B] = remove(node, key) - /** * Removes an entry from the map. * Note that if there is a conflicting update on another node the entry will @@ -175,10 +140,6 @@ final class LWWMap[A, B] private[pekko] (private[pekko] val underlying: ORMap[A, def remove(node: SelfUniqueAddress, key: A): LWWMap[A, B] = remove(node.uniqueAddress, key) - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def remove(node: Cluster, key: A): LWWMap[A, B] = - remove(node.selfUniqueAddress, key) - /** * INTERNAL API */ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWRegister.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWRegister.scala index d53f561f68..0f70c4620a 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWRegister.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/LWWRegister.scala @@ -15,7 +15,6 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko import pekko.annotation.InternalApi -import pekko.cluster.Cluster import pekko.cluster.UniqueAddress import pekko.util.HashCode @@ -65,10 +64,6 @@ object LWWRegister { def apply[A](node: SelfUniqueAddress, initialValue: A, clock: Clock[A]): LWWRegister[A] = apply(node.uniqueAddress, initialValue, clock) - @deprecated("Use `apply` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def apply[A](initialValue: A)(implicit node: Cluster, clock: Clock[A] = defaultClock[A]): LWWRegister[A] = - apply(node.selfUniqueAddress, initialValue, clock) - /** * Scala API * Creates a `LWWRegister` with implicits, given deprecated `apply` functions using Cluster constrain overloading. @@ -76,20 +71,6 @@ object LWWRegister { def create[A](initialValue: A)(implicit node: SelfUniqueAddress, clock: Clock[A] = defaultClock[A]): LWWRegister[A] = apply(node.uniqueAddress, initialValue, clock) - /** - * Java API - */ - @deprecated("Use `create` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def create[A](node: Cluster, initialValue: A): LWWRegister[A] = - apply(initialValue)(node) - - /** - * Java API - */ - @deprecated("Use `create` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def create[A](node: Cluster, initialValue: A, clock: Clock[A]): LWWRegister[A] = - apply(node.selfUniqueAddress, initialValue, clock) - /** * Java API */ @@ -179,18 +160,6 @@ final class LWWRegister[A] private[pekko] (private[pekko] val node: UniqueAddres def withValueOf(value: A)(implicit node: SelfUniqueAddress, clock: Clock[A] = defaultClock[A]): LWWRegister[A] = withValue(node, value, clock) - @deprecated("Use `withValueOf` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def withValue(value: A)(implicit node: Cluster, clock: Clock[A] = defaultClock[A]): LWWRegister[A] = - withValue(node, value, clock) - - @deprecated("Use `withValue` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def withValue(node: Cluster, value: A): LWWRegister[A] = - withValue(node, value, defaultClock[A]) - - @deprecated("Use `withValue` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def withValue(node: Cluster, value: A, clock: Clock[A]): LWWRegister[A] = - withValue(node.selfUniqueAddress, value, clock) - /** * The current `value` was set by this node. */ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala index 70b66681bd..1ef09ee54c 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMap.scala @@ -17,7 +17,6 @@ import scala.collection.immutable import org.apache.pekko import pekko.annotation.InternalApi -import pekko.cluster.Cluster import pekko.cluster.UniqueAddress import pekko.cluster.ddata.ORMap.ZeroTag import pekko.util.HashCode @@ -237,12 +236,6 @@ final class ORMap[A, B <: ReplicatedData] private[pekko] ( put(node.uniqueAddress, key, value) } - @deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def +(entry: (A, B))(implicit node: Cluster): ORMap[A, B] = { - val (key, value) = entry - put(node.selfUniqueAddress, key, value) - } - /** * Adds an entry to the map. * Note that the new `value` will be merged with existing values @@ -259,9 +252,6 @@ final class ORMap[A, B <: ReplicatedData] private[pekko] ( */ def put(node: SelfUniqueAddress, key: A, value: B): ORMap[A, B] = put(node.uniqueAddress, key, value) - @deprecated("Use `put` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def put(node: Cluster, key: A, value: B): ORMap[A, B] = put(node.selfUniqueAddress, key, value) - /** * INTERNAL API */ @@ -287,20 +277,6 @@ final class ORMap[A, B <: ReplicatedData] private[pekko] ( def updated(node: SelfUniqueAddress, key: A, initial: B)(modify: B => B): ORMap[A, B] = updated(node.uniqueAddress, key, initial)(modify) - @deprecated("Use `updated` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def updated(node: Cluster, key: A, initial: B)(modify: B => B): ORMap[A, B] = - updated(node.selfUniqueAddress, key, initial)(modify) - - /** - * Java API: Replace a value by applying the `modify` function on the existing value. - * - * If there is no current value for the `key` the `initial` value will be - * passed to the `modify` function. - */ - @deprecated("use update for the Java API as updated is ambiguous with the Scala API", "Akka 2.5.20") - def updated(node: Cluster, key: A, initial: B, modify: java.util.function.Function[B, B]): ORMap[A, B] = - updated(node.selfUniqueAddress, key, initial)(value => modify.apply(value)) - /** * Java API: Replace a value by applying the `modify` function on the existing value. * @@ -310,10 +286,6 @@ final class ORMap[A, B <: ReplicatedData] private[pekko] ( def update(node: SelfUniqueAddress, key: A, initial: B, modify: java.util.function.Function[B, B]): ORMap[A, B] = updated(node.uniqueAddress, key, initial)(value => modify.apply(value)) - @deprecated("Use `update` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def update(node: Cluster, key: A, initial: B, modify: java.util.function.Function[B, B]): ORMap[A, B] = - updated(node, key, initial)(value => modify.apply(value)) - /** * INTERNAL API */ @@ -361,12 +333,6 @@ final class ORMap[A, B <: ReplicatedData] private[pekko] ( */ def remove(node: SelfUniqueAddress, key: A): ORMap[A, B] = remove(node.uniqueAddress, key) - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def -(key: A)(implicit node: Cluster): ORMap[A, B] = remove(node.selfUniqueAddress, key) - - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def remove(node: Cluster, key: A): ORMap[A, B] = remove(node.selfUniqueAddress, key) - /** * INTERNAL API */ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala index 36c3eb4ef5..8f40d0de37 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORMultiMap.scala @@ -15,7 +15,7 @@ package org.apache.pekko.cluster.ddata import org.apache.pekko import pekko.annotation.InternalApi -import pekko.cluster.{ Cluster, UniqueAddress } +import pekko.cluster.UniqueAddress import pekko.cluster.ddata.ORMap._ object ORMultiMap { @@ -155,12 +155,6 @@ final class ORMultiMap[A, B] private[pekko] ( put(node.uniqueAddress, key, value) } - @deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def +(entry: (A, Set[B]))(implicit node: Cluster): ORMultiMap[A, B] = { - val (key, value) = entry - put(node.selfUniqueAddress, key, value) - } - /** * Scala API: Associate an entire set with the key while retaining the history of the previous * replicated data set. @@ -168,10 +162,6 @@ final class ORMultiMap[A, B] private[pekko] ( def put(node: SelfUniqueAddress, key: A, value: Set[B]): ORMultiMap[A, B] = put(node.uniqueAddress, key, value) - @deprecated("Use `put` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def put(node: Cluster, key: A, value: Set[B]): ORMultiMap[A, B] = - put(node.selfUniqueAddress, key, value) - /** * Java API: Associate an entire set with the key while retaining the history of the previous * replicated data set. @@ -181,12 +171,6 @@ final class ORMultiMap[A, B] private[pekko] ( put(node.uniqueAddress, key, value.asScala.toSet) } - @deprecated("Use `put` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def put(node: Cluster, key: A, value: java.util.Set[B]): ORMultiMap[A, B] = { - import pekko.util.ccompat.JavaConverters._ - put(node.selfUniqueAddress, key, value.asScala.toSet) - } - /** * INTERNAL API */ @@ -205,22 +189,12 @@ final class ORMultiMap[A, B] private[pekko] ( */ def remove(key: A)(implicit node: SelfUniqueAddress): ORMultiMap[A, B] = remove(node.uniqueAddress, key) - /** - * Convenience for remove. Requires an implicit Cluster. - * @see [[ORMultiMap#remove(node:org\.apache\.pekko\.cluster\.ddata\.SelfUniqueAddress*]] - */ - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def -(key: A)(implicit node: Cluster): ORMultiMap[A, B] = remove(node.selfUniqueAddress, key) - /** * Java API * Remove an entire set associated with the key. */ def remove(node: SelfUniqueAddress, key: A): ORMultiMap[A, B] = remove(node.uniqueAddress, key) - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def remove(node: Cluster, key: A): ORMultiMap[A, B] = remove(node.selfUniqueAddress, key) - /** * INTERNAL API */ @@ -245,14 +219,6 @@ final class ORMultiMap[A, B] private[pekko] ( def addBindingBy(key: A, element: B)(implicit node: SelfUniqueAddress): ORMultiMap[A, B] = addBinding(node, key, element) - @deprecated("Use `addBinding` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def addBinding(key: A, element: B)(implicit node: Cluster): ORMultiMap[A, B] = - addBinding(node.selfUniqueAddress, key, element) - - @deprecated("Use `addBinding` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def addBinding(node: Cluster, key: A, element: B): ORMultiMap[A, B] = - addBinding(node.selfUniqueAddress, key, element) - /** * INTERNAL API */ @@ -273,14 +239,6 @@ final class ORMultiMap[A, B] private[pekko] ( def removeBindingBy(key: A, element: B)(implicit node: SelfUniqueAddress): ORMultiMap[A, B] = removeBinding(node, key, element) - @deprecated("Use `removeBinding` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def removeBinding(key: A, element: B)(implicit node: Cluster): ORMultiMap[A, B] = - removeBinding(node.selfUniqueAddress, key, element) - - @deprecated("Use `removeBinding` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def removeBinding(node: Cluster, key: A, element: B): ORMultiMap[A, B] = - removeBinding(node.selfUniqueAddress, key, element) - /** * INTERNAL API */ @@ -310,10 +268,6 @@ final class ORMultiMap[A, B] private[pekko] ( def replaceBindingBy(key: A, oldElement: B, newElement: B)(implicit node: SelfUniqueAddress): ORMultiMap[A, B] = replaceBinding(node, key, oldElement, newElement) - @deprecated("Use `replaceBinding` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def replaceBinding(key: A, oldElement: B, newElement: B)(implicit node: Cluster): ORMultiMap[A, B] = - replaceBinding(node.selfUniqueAddress, key, oldElement, newElement) - /** * INTERNAL API */ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala index 25ec5dfb15..7538cba27c 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/ORSet.scala @@ -36,7 +36,6 @@ import scala.collection.immutable import org.apache.pekko import pekko.annotation.InternalApi -import pekko.cluster.Cluster import pekko.cluster.UniqueAddress import pekko.util.{ unused, HashCode } @@ -351,15 +350,9 @@ final class ORSet[A] private[pekko] ( /** Adds an element to the set. */ def :+(element: A)(implicit node: SelfUniqueAddress): ORSet[A] = add(node, element) - @deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def +(element: A)(implicit node: Cluster): ORSet[A] = add(node.selfUniqueAddress, element) - /** Adds an element to the set. */ def add(node: SelfUniqueAddress, element: A): ORSet[A] = add(node.uniqueAddress, element) - @deprecated("Use `add` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def add(node: Cluster, element: A): ORSet[A] = add(node.selfUniqueAddress, element) - /** * INTERNAL API */ @@ -389,18 +382,6 @@ final class ORSet[A] private[pekko] ( */ def remove(node: SelfUniqueAddress, element: A): ORSet[A] = remove(node.uniqueAddress, element) - /** - * Removes an element from the set. - */ - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def -(element: A)(implicit node: Cluster): ORSet[A] = remove(node.selfUniqueAddress, element) - - /** - * Removes an element from the set. - */ - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def remove(node: Cluster, element: A): ORSet[A] = remove(node.selfUniqueAddress, element) - /** * INTERNAL API */ @@ -422,9 +403,6 @@ final class ORSet[A] private[pekko] ( */ def clear(@unused node: SelfUniqueAddress): ORSet[A] = clear() - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def clear(@unused node: Cluster): ORSet[A] = clear() - /** * INTERNAL API */ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounter.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounter.scala index 63a69febce..36ff6495fb 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounter.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounter.scala @@ -17,7 +17,6 @@ import java.math.BigInteger import org.apache.pekko import pekko.annotation.InternalApi -import pekko.cluster.Cluster import pekko.cluster.UniqueAddress import pekko.util.HashCode @@ -76,36 +75,24 @@ final class PNCounter private[pekko] (private[pekko] val increments: GCounter, p */ def :+(n: Long)(implicit node: SelfUniqueAddress): PNCounter = increment(node.uniqueAddress, n) - @deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def +(n: Long)(implicit node: Cluster): PNCounter = increment(node.selfUniqueAddress, n) - /** * Increment the counter with the delta `n` specified. * If the delta is negative then it will decrement instead of increment. */ def :+(n: BigInt)(implicit node: SelfUniqueAddress): PNCounter = increment(node.uniqueAddress, n) - @deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def +(n: BigInt)(implicit node: Cluster): PNCounter = increment(node.selfUniqueAddress, n) - /** * Scala API: Increment the counter with the delta `n` specified. * If the delta is negative then it will decrement instead of increment. */ def increment(n: Long)(implicit node: SelfUniqueAddress): PNCounter = increment(node.uniqueAddress, n) - @deprecated("Use `increment` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def increment(node: Cluster, n: Long = 1): PNCounter = increment(node.selfUniqueAddress, n) - /** * Increment the counter with the delta `n` specified. * If the delta is negative then it will decrement instead of increment. */ def increment(n: BigInt)(implicit node: SelfUniqueAddress): PNCounter = increment(node.uniqueAddress, n) - @deprecated("Use `increment` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def increment(node: Cluster, n: BigInt): PNCounter = increment(node.selfUniqueAddress, n) - /** * Java API: Increment the counter with the delta `n` specified. * If the delta is negative then it will decrement instead of increment. @@ -118,54 +105,36 @@ final class PNCounter private[pekko] (private[pekko] val increments: GCounter, p */ def increment(node: SelfUniqueAddress, n: Long): PNCounter = increment(node.uniqueAddress, n) - @deprecated("Use `increment` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def increment(node: Cluster, n: java.math.BigInteger): PNCounter = increment(node.selfUniqueAddress, n) - /** * Decrement the counter with the delta `n` specified. * If the delta is negative then it will increment instead of decrement. */ def decrement(n: Long)(implicit node: SelfUniqueAddress): PNCounter = decrement(node.uniqueAddress, n) - @deprecated("Use `decrement` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def -(n: Long)(implicit node: Cluster): PNCounter = decrement(node.selfUniqueAddress, n) - /** * Decrement the counter with the delta `n` specified. * If the delta is negative then it will increment instead of decrement. */ def decrement(n: BigInt)(implicit node: SelfUniqueAddress): PNCounter = decrement(node.uniqueAddress, n) - @deprecated("Use `decrement` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def -(n: BigInt)(implicit node: Cluster): PNCounter = decrement(node.selfUniqueAddress, n) - /** * Decrement the counter with the delta `n` specified. * If the delta `n` is negative then it will increment instead of decrement. */ def decrement(node: SelfUniqueAddress, n: Long): PNCounter = decrement(node.uniqueAddress, n) - @deprecated("Use `decrement` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def decrement(node: Cluster, n: Long = 1): PNCounter = decrement(node.selfUniqueAddress, n) - /** * Scala API: Decrement the counter with the delta `n` specified. * If the delta `n` is negative then it will increment instead of decrement. */ def decrement(node: SelfUniqueAddress, n: BigInt): PNCounter = decrement(node.uniqueAddress, n) - @deprecated("Use `decrement` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def decrement(node: Cluster, n: BigInt): PNCounter = decrement(node.selfUniqueAddress, n) - /** * Java API: Decrement the counter with the delta `n` specified. * If the delta `n` is negative then it will increment instead of decrement. */ def decrement(node: SelfUniqueAddress, n: java.math.BigInteger): PNCounter = decrement(node.uniqueAddress, n) - @deprecated("Use `decrement` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def decrement(node: Cluster, n: java.math.BigInteger): PNCounter = decrement(node.selfUniqueAddress, n) - /** Internal API */ @InternalApi private[pekko] def increment(key: UniqueAddress, n: BigInt): PNCounter = change(key, n) diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounterMap.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounterMap.scala index b4357f47bd..6519b90122 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounterMap.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/PNCounterMap.scala @@ -105,10 +105,6 @@ final class PNCounterMap[A] private[pekko] (private[pekko] val underlying: ORMap def increment(node: SelfUniqueAddress, key: A, delta: Long): PNCounterMap[A] = increment(node.uniqueAddress, key, delta) - @deprecated("Use `increment` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def increment(node: Cluster, key: A, delta: Long): PNCounterMap[A] = - increment(node.selfUniqueAddress, key, delta) - /** * INTERNAL API */ @@ -131,18 +127,6 @@ final class PNCounterMap[A] private[pekko] (private[pekko] val underlying: ORMap def decrement(node: SelfUniqueAddress, key: A, delta: Long): PNCounterMap[A] = decrement(node.uniqueAddress, key, delta) - @deprecated("Use `decrement` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def decrement(key: A, delta: Long = 1)(implicit node: Cluster): PNCounterMap[A] = - decrement(node.selfUniqueAddress, key, delta) - - /** - * Decrement the counter with the delta specified. - * If the delta is negative then it will increment instead of decrement. - */ - @deprecated("Use `decrement` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def decrement(node: Cluster, key: A, delta: Long): PNCounterMap[A] = - decrement(node.selfUniqueAddress, key, delta) - /** * INTERNAL API */ @@ -158,13 +142,6 @@ final class PNCounterMap[A] private[pekko] (private[pekko] val underlying: ORMap def remove(key: A)(implicit node: SelfUniqueAddress): PNCounterMap[A] = remove(node.uniqueAddress, key) - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def remove(node: Cluster, key: A): PNCounterMap[A] = - remove(node.selfUniqueAddress, key) - - @deprecated("Use `remove` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def -(key: A)(implicit node: Cluster): PNCounterMap[A] = remove(node, key) - /** * INTERNAL API */ diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala index 0a78b959cb..39749f1687 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/Replicator.scala @@ -178,185 +178,6 @@ final class ReplicatorSettings( val preferOldest: Boolean, val logDataSizeExceeding: Option[Int]) { - // for backwards compatibility - @deprecated("use full constructor", "Akka 2.6.11") - def this( - roles: Set[String], - gossipInterval: FiniteDuration, - notifySubscribersInterval: FiniteDuration, - maxDeltaElements: Int, - dispatcher: String, - pruningInterval: FiniteDuration, - maxPruningDissemination: FiniteDuration, - durableStoreProps: Either[(String, Config), Props], - durableKeys: Set[KeyId], - pruningMarkerTimeToLive: FiniteDuration, - durablePruningMarkerTimeToLive: FiniteDuration, - deltaCrdtEnabled: Boolean, - maxDeltaSize: Int, - preferOldest: Boolean) = - this( - roles, - gossipInterval, - notifySubscribersInterval, - maxDeltaElements, - dispatcher, - pruningInterval, - maxPruningDissemination, - durableStoreProps, - durableKeys, - pruningMarkerTimeToLive, - durablePruningMarkerTimeToLive, - deltaCrdtEnabled, - maxDeltaSize, - preferOldest, - logDataSizeExceeding = Some(10 * 1024)) - - // for backwards compatibility - @deprecated("use full constructor", "Akka 2.6.11") - def this( - roles: Set[String], - gossipInterval: FiniteDuration, - notifySubscribersInterval: FiniteDuration, - maxDeltaElements: Int, - dispatcher: String, - pruningInterval: FiniteDuration, - maxPruningDissemination: FiniteDuration, - durableStoreProps: Either[(String, Config), Props], - durableKeys: Set[KeyId], - pruningMarkerTimeToLive: FiniteDuration, - durablePruningMarkerTimeToLive: FiniteDuration, - deltaCrdtEnabled: Boolean, - maxDeltaSize: Int) = - this( - roles, - gossipInterval, - notifySubscribersInterval, - maxDeltaElements, - dispatcher, - pruningInterval, - maxPruningDissemination, - durableStoreProps, - durableKeys, - pruningMarkerTimeToLive, - durablePruningMarkerTimeToLive, - deltaCrdtEnabled, - maxDeltaSize, - preferOldest = false) - - // for backwards compatibility - @deprecated("use full constructor", "Akka 2.6.11") - def this( - role: Option[String], - gossipInterval: FiniteDuration, - notifySubscribersInterval: FiniteDuration, - maxDeltaElements: Int, - dispatcher: String, - pruningInterval: FiniteDuration, - maxPruningDissemination: FiniteDuration, - durableStoreProps: Either[(String, Config), Props], - durableKeys: Set[KeyId], - pruningMarkerTimeToLive: FiniteDuration, - durablePruningMarkerTimeToLive: FiniteDuration, - deltaCrdtEnabled: Boolean, - maxDeltaSize: Int) = - this( - role.toSet, - gossipInterval, - notifySubscribersInterval, - maxDeltaElements, - dispatcher, - pruningInterval, - maxPruningDissemination, - durableStoreProps, - durableKeys, - pruningMarkerTimeToLive, - durablePruningMarkerTimeToLive, - deltaCrdtEnabled, - maxDeltaSize) - - // For backwards compatibility - @deprecated("use full constructor", "Akka 2.6.11") - def this( - role: Option[String], - gossipInterval: FiniteDuration, - notifySubscribersInterval: FiniteDuration, - maxDeltaElements: Int, - dispatcher: String, - pruningInterval: FiniteDuration, - maxPruningDissemination: FiniteDuration) = - this( - roles = role.toSet, - gossipInterval, - notifySubscribersInterval, - maxDeltaElements, - dispatcher, - pruningInterval, - maxPruningDissemination, - Right(Props.empty), - Set.empty, - 6.hours, - 10.days, - true, - 200) - - // For backwards compatibility - @deprecated("use full constructor", "Akka 2.6.11") - def this( - role: Option[String], - gossipInterval: FiniteDuration, - notifySubscribersInterval: FiniteDuration, - maxDeltaElements: Int, - dispatcher: String, - pruningInterval: FiniteDuration, - maxPruningDissemination: FiniteDuration, - durableStoreProps: Either[(String, Config), Props], - durableKeys: Set[String]) = - this( - role, - gossipInterval, - notifySubscribersInterval, - maxDeltaElements, - dispatcher, - pruningInterval, - maxPruningDissemination, - durableStoreProps, - durableKeys, - 6.hours, - 10.days, - true, - 200) - - // For backwards compatibility - @deprecated("use full constructor", "Akka 2.6.11") - def this( - role: Option[String], - gossipInterval: FiniteDuration, - notifySubscribersInterval: FiniteDuration, - maxDeltaElements: Int, - dispatcher: String, - pruningInterval: FiniteDuration, - maxPruningDissemination: FiniteDuration, - durableStoreProps: Either[(String, Config), Props], - durableKeys: Set[String], - pruningMarkerTimeToLive: FiniteDuration, - durablePruningMarkerTimeToLive: FiniteDuration, - deltaCrdtEnabled: Boolean) = - this( - role, - gossipInterval, - notifySubscribersInterval, - maxDeltaElements, - dispatcher, - pruningInterval, - maxPruningDissemination, - durableStoreProps, - durableKeys, - pruningMarkerTimeToLive, - durablePruningMarkerTimeToLive, - deltaCrdtEnabled, - 200) - def withRole(role: String): ReplicatorSettings = copy(roles = ReplicatorSettings.roleOption(role).toSet) def withRole(role: Option[String]): ReplicatorSettings = copy(roles = role.toSet) diff --git a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala index 2d438207b1..fe41e8bf7a 100644 --- a/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala +++ b/distributed-data/src/main/scala/org/apache/pekko/cluster/ddata/VersionVector.scala @@ -20,7 +20,6 @@ import scala.collection.immutable.TreeMap import org.apache.pekko import pekko.annotation.InternalApi -import pekko.cluster.Cluster import pekko.cluster.UniqueAddress /** @@ -120,9 +119,6 @@ sealed abstract class VersionVector extends ReplicatedData with ReplicatedDataSe */ def :+(node: SelfUniqueAddress): VersionVector = increment(node) - @deprecated("Use `:+` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def +(node: Cluster): VersionVector = increment(node.selfUniqueAddress) - /** * INTERNAL API * Increment the version for the node passed as argument. Returns a new VersionVector. @@ -134,9 +130,6 @@ sealed abstract class VersionVector extends ReplicatedData with ReplicatedDataSe */ def increment(node: SelfUniqueAddress): VersionVector = increment(node.uniqueAddress) - @deprecated("Use `increment` that takes a `SelfUniqueAddress` parameter instead.", since = "Akka 2.5.20") - def increment(node: Cluster): VersionVector = increment(node.selfUniqueAddress) - def isEmpty: Boolean /** --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pekko.apache.org For additional commands, e-mail: commits-h...@pekko.apache.org