diff --git a/akka-projection-grpc/src/main/mima-filters/1.5.4.backwards.excludes/res-replay-filter.excludes b/akka-projection-grpc/src/main/mima-filters/1.5.4.backwards.excludes/res-replay-filter.excludes new file mode 100644 index 000000000..086d63852 --- /dev/null +++ b/akka-projection-grpc/src/main/mima-filters/1.5.4.backwards.excludes/res-replay-filter.excludes @@ -0,0 +1,3 @@ +# remove ApiMayChange +ProblemFilters.exclude[FinalClassProblem]("akka.projection.grpc.consumer.ConsumerFilter") +ProblemFilters.exclude[FinalClassProblem]("akka.projection.grpc.consumer.javadsl.GrpcReadJournal") diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/ConsumerFilter.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/ConsumerFilter.scala index fb98e9010..b9083592e 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/ConsumerFilter.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/ConsumerFilter.scala @@ -16,7 +16,6 @@ import akka.actor.typed.ActorSystem import akka.actor.typed.Extension import akka.actor.typed.ExtensionId import akka.actor.typed.Props -import akka.annotation.ApiMayChange import akka.annotation.InternalApi import akka.persistence.typed.ReplicaId import akka.projection.grpc.internal.ConsumerFilterRegistry @@ -28,7 +27,6 @@ import com.typesafe.config.Config /** * Extension to dynamically control the filters for the `GrpcReadJournal`. */ -@ApiMayChange object ConsumerFilter extends ExtensionId[ConsumerFilter] { private val ReplicationIdSeparator = '|' @@ -592,8 +590,7 @@ object ConsumerFilter extends ExtensionId[ConsumerFilter] { } -@ApiMayChange -class ConsumerFilter(system: ActorSystem[_]) extends Extension { +final class ConsumerFilter(system: ActorSystem[_]) extends Extension { private val settings = ConsumerFilter.ConsumerFilterSettings(system) diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/GrpcQuerySettings.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/GrpcQuerySettings.scala index 56f16765f..ca79a33bd 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/GrpcQuerySettings.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/GrpcQuerySettings.scala @@ -5,7 +5,6 @@ package akka.projection.grpc.consumer import akka.actor.ClassicActorSystemProvider -import akka.annotation.ApiMayChange import akka.grpc.scaladsl.Metadata import akka.grpc.scaladsl.MetadataBuilder import akka.projection.grpc.consumer.scaladsl.GrpcReadJournal @@ -13,7 +12,6 @@ import com.typesafe.config.Config import akka.util.ccompat.JavaConverters._ import scala.collection.immutable -@ApiMayChange object GrpcQuerySettings { /** @@ -81,7 +79,6 @@ object GrpcQuerySettings { } } -@ApiMayChange final class GrpcQuerySettings private ( val streamId: String, val additionalRequestMetadata: Option[Metadata], diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/EventDestinationInterceptor.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/EventDestinationInterceptor.scala index ab20168ed..31ce4722f 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/EventDestinationInterceptor.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/EventDestinationInterceptor.scala @@ -5,14 +5,12 @@ package akka.projection.grpc.consumer.javadsl import akka.Done -import akka.annotation.ApiMayChange import akka.grpc.javadsl.Metadata import java.util.concurrent.CompletionStage /** * Interceptor allowing for example authentication/authorization of incoming connections to a [[EventProducerPushDestination]] */ -@ApiMayChange @FunctionalInterface trait EventDestinationInterceptor { diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/EventProducerPushDestination.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/EventProducerPushDestination.scala index 31b84d72c..5aa4fe5c9 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/EventProducerPushDestination.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/EventProducerPushDestination.scala @@ -6,7 +6,6 @@ package akka.projection.grpc.consumer.javadsl import akka.Done import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.annotation.InternalApi import akka.dispatch.ExecutionContexts import akka.grpc.internal.JavaMetadataImpl @@ -45,7 +44,6 @@ import scala.jdk.OptionConverters.RichOption * * Producers are started using the [[akka.projection.grpc.producer.javadsl.EventProducerPush]] API. */ -@ApiMayChange object EventProducerPushDestination { /** @@ -111,7 +109,6 @@ object EventProducerPushDestination { } -@ApiMayChange final class EventProducerPushDestination private ( val journalPluginId: Optional[String], val acceptedStreamId: String, diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/GrpcReadJournal.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/GrpcReadJournal.scala index c47f4d268..575d8e19e 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/GrpcReadJournal.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/javadsl/GrpcReadJournal.scala @@ -13,7 +13,6 @@ import scala.compat.java8.OptionConverters._ import akka.Done import akka.NotUsed import akka.actor.ClassicActorSystemProvider -import akka.annotation.ApiMayChange import akka.annotation.InternalApi import akka.dispatch.ExecutionContexts import akka.grpc.GrpcClientSettings @@ -31,7 +30,6 @@ import akka.projection.internal.CanTriggerReplay import akka.stream.javadsl.Source import com.google.protobuf.Descriptors -@ApiMayChange object GrpcReadJournal { val Identifier: String = scaladsl.GrpcReadJournal.Identifier @@ -83,8 +81,7 @@ object GrpcReadJournal { } -@ApiMayChange -class GrpcReadJournal(delegate: scaladsl.GrpcReadJournal) +final class GrpcReadJournal(delegate: scaladsl.GrpcReadJournal) extends ReadJournal with EventsBySliceQuery with EventTimestampQuery diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/EventDestinationInterceptor.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/EventDestinationInterceptor.scala index bf61c11a7..e7d99cd2c 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/EventDestinationInterceptor.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/EventDestinationInterceptor.scala @@ -5,7 +5,6 @@ package akka.projection.grpc.consumer.scaladsl import akka.Done -import akka.annotation.ApiMayChange import akka.grpc.scaladsl.Metadata import scala.concurrent.Future @@ -13,7 +12,6 @@ import scala.concurrent.Future /** * Interceptor allowing for example authentication/authorization of incoming connections to a [[EventProducerPushDestination]] */ -@ApiMayChange @FunctionalInterface trait EventDestinationInterceptor { diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/EventProducerPushDestination.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/EventProducerPushDestination.scala index 3ca5e4a83..be81b40ab 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/EventProducerPushDestination.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/EventProducerPushDestination.scala @@ -5,7 +5,6 @@ package akka.projection.grpc.consumer.scaladsl import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.annotation.InternalApi import akka.grpc.scaladsl.Metadata import akka.http.scaladsl.model.HttpRequest @@ -36,7 +35,6 @@ import akka.projection.grpc.replication.scaladsl.ReplicationSettings * * Producers are started using the [[akka.projection.grpc.producer.scaladsl.EventProducerPush]] API. */ -@ApiMayChange object EventProducerPushDestination { /** @@ -57,7 +55,6 @@ object EventProducerPushDestination { EventProducerPushDestinationSettings(system), None) - @ApiMayChange object Transformation { /** @@ -185,7 +182,6 @@ object EventProducerPushDestination { } -@ApiMayChange final class EventProducerPushDestination private[akka] ( val journalPluginId: Option[String], val acceptedStreamId: String, diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/GrpcReadJournal.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/GrpcReadJournal.scala index 7e3033408..72f7d7382 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/GrpcReadJournal.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/consumer/scaladsl/GrpcReadJournal.scala @@ -10,7 +10,6 @@ import akka.actor.ClassicActorSystemProvider import akka.actor.ExtendedActorSystem import akka.actor.typed.scaladsl.LoggerOps import akka.actor.typed.scaladsl.adapter._ -import akka.annotation.ApiMayChange import akka.annotation.InternalApi import akka.grpc.GrpcClientSettings import akka.grpc.scaladsl.BytesEntry @@ -67,7 +66,6 @@ import scala.concurrent.Future import akka.projection.grpc.internal.proto.ReplayPersistenceId import akka.projection.grpc.internal.proto.ReplicaInfo import akka.projection.grpc.replication.scaladsl.ReplicationSettings -@ApiMayChange object GrpcReadJournal { val Identifier = "akka.projection.grpc.consumer" @@ -159,7 +157,6 @@ object GrpcReadJournal { } -@ApiMayChange final class GrpcReadJournal private ( system: ExtendedActorSystem, settings: GrpcQuerySettings, diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/EventProducerSettings.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/EventProducerSettings.scala index 3e9f79a13..add0854ce 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/EventProducerSettings.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/EventProducerSettings.scala @@ -5,13 +5,11 @@ package akka.projection.grpc.producer import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.util.JavaDurationConverters.JavaDurationOps import com.typesafe.config.Config import scala.concurrent.duration.FiniteDuration -@ApiMayChange object EventProducerSettings { /** Scala API */ @@ -37,7 +35,6 @@ object EventProducerSettings { apply(config) } -@ApiMayChange final class EventProducerSettings private ( val queryPluginId: String, val transformationParallelism: Int, diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducer.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducer.scala index 3de899589..72081f43b 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducer.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducer.scala @@ -5,7 +5,6 @@ package akka.projection.grpc.producer.javadsl import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.dispatch.ExecutionContexts import akka.http.javadsl.model.HttpRequest import akka.http.javadsl.model.HttpResponse @@ -23,7 +22,6 @@ import scala.compat.java8.OptionConverters.RichOptionalGeneric /** * The event producer implementation that can be included a gRPC route in an Akka HTTP server. */ -@ApiMayChange object EventProducer { /** diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducerInterceptor.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducerInterceptor.scala index cb327de2f..8fdeae8a6 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducerInterceptor.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducerInterceptor.scala @@ -5,7 +5,6 @@ package akka.projection.grpc.producer.javadsl import akka.Done -import akka.annotation.ApiMayChange import akka.grpc.internal.JavaMetadataImpl import akka.grpc.javadsl.Metadata import akka.grpc.scaladsl @@ -17,7 +16,6 @@ import scala.concurrent.Future /** * Interceptor allowing for example authentication/authorization of incoming requests to consume a specific stream. */ -@ApiMayChange @FunctionalInterface trait EventProducerInterceptor { diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducerSource.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducerSource.scala index b452644db..c31af97e3 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducerSource.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/EventProducerSource.scala @@ -6,7 +6,6 @@ package akka.projection.grpc.producer.javadsl import java.util.Optional import java.util.function.{ Function => JFunction } -import akka.annotation.ApiMayChange import akka.annotation.InternalApi import akka.persistence.query.typed.EventEnvelope import akka.projection.grpc.internal.TopicMatcher @@ -39,7 +38,6 @@ object EventProducerSource { * @param transformation Transformations for turning the internal events to public message types * @param settings The event producer settings used (can be shared for multiple sources) */ -@ApiMayChange final class EventProducerSource( val entityType: String, val streamId: String, diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/Transformation.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/Transformation.scala index 873cdb23e..9741e6d93 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/Transformation.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/javadsl/Transformation.scala @@ -4,7 +4,6 @@ package akka.projection.grpc.producer.javadsl -import akka.annotation.ApiMayChange import akka.dispatch.ExecutionContexts import akka.persistence.query.typed.EventEnvelope import akka.projection.grpc.producer.scaladsl @@ -17,14 +16,12 @@ import scala.compat.java8.FutureConverters._ import scala.compat.java8.OptionConverters._ import scala.reflect.ClassTag -@ApiMayChange @FunctionalInterface trait Mapper[A, B] { def apply(event: A, metadata: Optional[Any]): CompletionStage[Optional[B]] } -@ApiMayChange object Transformation { /** @@ -47,7 +44,6 @@ object Transformation { * Not for direct construction, use [[Transformation.empty]] as starting point and register * mappers to build your needed Transformation */ -@ApiMayChange final class Transformation private[akka] (private[akka] val delegate: scaladsl.EventProducer.Transformation) { /** diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/scaladsl/EventProducer.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/scaladsl/EventProducer.scala index 099c76731..051d40054 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/scaladsl/EventProducer.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/producer/scaladsl/EventProducer.scala @@ -9,7 +9,6 @@ import scala.reflect.ClassTag import akka.Done import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.annotation.InternalApi import akka.grpc.scaladsl.Metadata import akka.http.scaladsl.model.HttpRequest @@ -31,7 +30,6 @@ import akka.projection.grpc.replication.internal.EventOriginFilter /** * The event producer implementation that can be included a gRPC route in an Akka HTTP server. */ -@ApiMayChange object EventProducer { object EventProducerSource { @@ -72,7 +70,6 @@ object EventProducer { * @param transformation Transformations for turning the internal events to public message types * @param settings The event producer settings used (can be shared for multiple sources) */ - @ApiMayChange final class EventProducerSource private ( val entityType: String, val streamId: String, @@ -138,7 +135,6 @@ object EventProducer { } - @ApiMayChange object Transformation { /** @@ -164,7 +160,6 @@ object EventProducer { * Transformation of events to the external (public) representation. * Events can be excluded by mapping them to `None`. */ - @ApiMayChange final class Transformation private ( private[akka] val mappers: Map[Class[_], EventEnvelope[Any] => Future[Option[Any]]], private[akka] val orElse: EventEnvelope[Any] => Future[Option[Any]]) { @@ -373,7 +368,6 @@ object EventProducer { /** * Interceptor allowing for example authentication/authorization of incoming requests to consume a specific stream. */ -@ApiMayChange trait EventProducerInterceptor { /** diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/Replica.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/Replica.scala index 4efd20fe4..fc0f0c4fb 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/Replica.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/Replica.scala @@ -4,7 +4,6 @@ package akka.projection.grpc.replication.javadsl -import akka.annotation.ApiMayChange import akka.annotation.DoNotInherit import akka.grpc.GrpcClientSettings import akka.persistence.typed.ReplicaId @@ -12,7 +11,6 @@ import akka.projection.grpc.replication.internal.ReplicaImpl import java.util.Optional -@ApiMayChange object Replica { /** @@ -28,9 +26,8 @@ object Replica { } /** - * Not for user extension, construct using Replica#create + * Not for user extension, construct using [[Replica.create]] */ -@ApiMayChange @DoNotInherit trait Replica { diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicatedBehaviors.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicatedBehaviors.scala index b60dc65b1..403cdc952 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicatedBehaviors.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicatedBehaviors.scala @@ -5,7 +5,7 @@ package akka.projection.grpc.replication.javadsl import akka.actor.typed.Behavior -import akka.annotation.ApiMayChange +import akka.annotation.DoNotInherit import akka.japi.function.{ Function => JFunction } import akka.persistence.typed.javadsl.EventSourcedBehavior import akka.persistence.typed.javadsl.ReplicationContext @@ -16,8 +16,10 @@ import akka.persistence.typed.javadsl.ReplicationContext * Must be used to create an event sourced behavior to be replicated with [[Replication.grpcReplication]]. * * Can optionally be composed with other Behavior factories, to get access to actor context or timers. + * + * Not for user extension. */ -@ApiMayChange +@DoNotInherit abstract class ReplicatedBehaviors[Command, Event, State] { def setup(factory: JFunction[ReplicationContext, EventSourcedBehavior[Command, Event, State]]): Behavior[Command] } diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/Replication.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/Replication.scala index eeac4826c..0ec836065 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/Replication.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/Replication.scala @@ -8,7 +8,6 @@ import java.util.concurrent.CompletionStage import java.util.function.Predicate import akka.actor.typed.ActorSystem import akka.actor.typed.Behavior -import akka.annotation.ApiMayChange import akka.annotation.DoNotInherit import akka.japi.function.{ Function => JApiFunction } import akka.cluster.sharding.typed.ReplicatedEntity @@ -41,7 +40,6 @@ import scala.compat.java8.OptionConverters._ * * Not for user extension */ -@ApiMayChange @DoNotInherit trait Replication[Command] { @@ -81,7 +79,6 @@ trait Replication[Command] { def entityRefFactory: JFunction[String, EntityRef[Command]] } -@ApiMayChange object Replication { /** diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicationProjectionProvider.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicationProjectionProvider.scala index d28bf3faa..03bacb85b 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicationProjectionProvider.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicationProjectionProvider.scala @@ -7,7 +7,6 @@ package akka.projection.grpc.replication.javadsl import akka.Done import akka.NotUsed import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.persistence.query.Offset import akka.persistence.query.typed.EventEnvelope import akka.projection.ProjectionContext @@ -19,7 +18,6 @@ import akka.stream.javadsl.FlowWithContext /** * Factory for creating the projection where offsets are kept track of for the replication streams */ -@ApiMayChange @FunctionalInterface trait ReplicationProjectionProvider { diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicationSettings.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicationSettings.scala index 279b7b51d..b1ca5534d 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicationSettings.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/javadsl/ReplicationSettings.scala @@ -7,7 +7,6 @@ package akka.projection.grpc.replication.javadsl import java.util.function.{ Function => JFunction } import java.util.{ List => JList } import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.annotation.DoNotInherit import akka.annotation.InternalApi import akka.cluster.sharding.typed.ShardingEnvelope @@ -150,7 +149,6 @@ object ReplicationSettings { /** * Not for user extension, construct using ReplicationSettings#create */ -@ApiMayChange @DoNotInherit final class ReplicationSettings[Command] private ( val selfReplicaId: ReplicaId, diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/Replica.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/Replica.scala index a83e9246c..b99fd2e22 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/Replica.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/Replica.scala @@ -4,7 +4,7 @@ package akka.projection.grpc.replication.scaladsl -import akka.annotation.ApiMayChange +import akka.annotation.DoNotInherit import akka.grpc.GrpcClientSettings import akka.persistence.typed.ReplicaId import akka.projection.grpc.replication.internal.ReplicaImpl @@ -23,7 +23,10 @@ object Replica { } -@ApiMayChange +/** + * Not for user extension, construct using [[Replica.apply]] + */ +@DoNotInherit trait Replica { def replicaId: ReplicaId def numberOfConsumers: Int diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicatedBehaviors.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicatedBehaviors.scala index 8161dde21..618d73e31 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicatedBehaviors.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicatedBehaviors.scala @@ -5,7 +5,7 @@ package akka.projection.grpc.replication.scaladsl import akka.actor.typed.Behavior -import akka.annotation.ApiMayChange +import akka.annotation.DoNotInherit import akka.persistence.typed.scaladsl.EventSourcedBehavior import akka.persistence.typed.scaladsl.ReplicationContext @@ -15,8 +15,10 @@ import akka.persistence.typed.scaladsl.ReplicationContext * Must be used to create an event sourced behavior to be replicated with [[Replication.grpcReplication]]. * * Can optionally be composed with other Behavior factories, to get access to actor context or timers. + * + * Not for user extension. */ -@ApiMayChange +@DoNotInherit abstract class ReplicatedBehaviors[Command, Event, State] { def setup(factory: ReplicationContext => EventSourcedBehavior[Command, Event, State]): Behavior[Command] } diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/Replication.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/Replication.scala index f57a0e5f6..a1befbe12 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/Replication.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/Replication.scala @@ -7,7 +7,6 @@ package akka.projection.grpc.replication.scaladsl import scala.concurrent.Future import akka.actor.typed.ActorSystem import akka.actor.typed.Behavior -import akka.annotation.ApiMayChange import akka.annotation.DoNotInherit import akka.cluster.sharding.typed.ReplicatedEntity import akka.cluster.sharding.typed.scaladsl.Entity @@ -30,7 +29,6 @@ import akka.projection.grpc.replication.internal.ReplicationImpl * * Not for user extension */ -@ApiMayChange @DoNotInherit trait Replication[Command] { @@ -70,7 +68,6 @@ trait Replication[Command] { def entityRefFactory: String => EntityRef[Command] } -@ApiMayChange object Replication { /** diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicationProjectionProvider.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicationProjectionProvider.scala index 6aa3a5cc1..b9cde0717 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicationProjectionProvider.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicationProjectionProvider.scala @@ -7,7 +7,6 @@ package akka.projection.grpc.replication.scaladsl import akka.Done import akka.NotUsed import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.persistence.query.Offset import akka.persistence.query.typed.EventEnvelope import akka.projection.ProjectionContext @@ -19,7 +18,7 @@ import akka.stream.scaladsl.FlowWithContext /** * Factory/function for creating the projection where offsets are kept track of for the replication streams */ -@ApiMayChange +@FunctionalInterface trait ReplicationProjectionProvider { def apply( projectionId: ProjectionId, diff --git a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicationSettings.scala b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicationSettings.scala index 8f2a5fac4..a7d7da5da 100644 --- a/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicationSettings.scala +++ b/akka-projection-grpc/src/main/scala/akka/projection/grpc/replication/scaladsl/ReplicationSettings.scala @@ -8,7 +8,6 @@ import scala.collection.immutable import scala.concurrent.duration.FiniteDuration import scala.reflect.ClassTag import akka.actor.typed.ActorSystem -import akka.annotation.ApiMayChange import akka.annotation.InternalApi import akka.cluster.sharding.typed.ShardingEnvelope import akka.cluster.sharding.typed.scaladsl.Entity @@ -28,7 +27,6 @@ import com.typesafe.config.Config import scala.concurrent.duration.DurationInt -@ApiMayChange object ReplicationSettings { /** @@ -163,7 +161,6 @@ object ReplicationSettings { /** * Not for user extension. Constructed through companion object factories. */ -@ApiMayChange final class ReplicationSettings[Command] private ( val selfReplicaId: ReplicaId, val entityTypeKey: EntityTypeKey[Command], diff --git a/akka-projection-r2dbc/src/main/scala/akka/projection/r2dbc/internal/R2dbcOffsetStore.scala b/akka-projection-r2dbc/src/main/scala/akka/projection/r2dbc/internal/R2dbcOffsetStore.scala index b2989d013..7e54efb6c 100644 --- a/akka-projection-r2dbc/src/main/scala/akka/projection/r2dbc/internal/R2dbcOffsetStore.scala +++ b/akka-projection-r2dbc/src/main/scala/akka/projection/r2dbc/internal/R2dbcOffsetStore.scala @@ -556,7 +556,7 @@ private[projection] class R2dbcOffsetStore( val seqNr = recordWithOffset.record.seqNr val currentState = getState() - val duplicate = getState().isDuplicate(recordWithOffset.record) + val duplicate = currentState.isDuplicate(recordWithOffset.record) if (duplicate) { logger.trace("Filtering out duplicate sequence number [{}] for pid [{}]", seqNr, pid) diff --git a/docs/src/main/paradox/grpc-producer-push.md b/docs/src/main/paradox/grpc-producer-push.md index 41c360299..f826ac2d4 100644 --- a/docs/src/main/paradox/grpc-producer-push.md +++ b/docs/src/main/paradox/grpc-producer-push.md @@ -8,15 +8,6 @@ NAT in front of each producer. The consumer may also not know about all producer Akka Projection gRPC producer push solves this by letting the producers initiate the connection to the consumer and then push events that the consumer is interested in. -@@@ warning - -This module is currently marked as [May Change](https://doc.akka.io/docs/akka/current/common/may-change.html) -in the sense that the API might be changed based on feedback from initial usage. -However, the module is ready for usage in production and we will not break serialization format of -messages or stored data. - -@@@ - ## Overview ![overview.png](images/reverse-grpc.svg) diff --git a/docs/src/main/paradox/grpc-replicated-event-sourcing-transport.md b/docs/src/main/paradox/grpc-replicated-event-sourcing-transport.md index 33f01e1cc..203385880 100644 --- a/docs/src/main/paradox/grpc-replicated-event-sourcing-transport.md +++ b/docs/src/main/paradox/grpc-replicated-event-sourcing-transport.md @@ -14,15 +14,6 @@ Akka Replicated Event Sourcing over gRPC builds on @ref:[Akka Projection gRPC](g There are no requirements that the replicas are sharing a cluster, instead it is expected that each replica is a separate Akka cluster with the gRPC replication transport as only connection in between. -@@@ warning - -This module is currently marked as [May Change](https://doc.akka.io/docs/akka/current/common/may-change.html) -in the sense that the API might be changed based on feedback from initial usage. -However, the module is ready for usage in production and we will not break serialization format of -messages or stored data. - -@@@ - ## Overview For a basic overview of Replicated Event Sourcing see the @extref:[Akka Replicated Event Sourcing docs](akka:typed/replicated-eventsourcing.html) diff --git a/docs/src/main/paradox/grpc.md b/docs/src/main/paradox/grpc.md index 384d3cced..6ec39025e 100644 --- a/docs/src/main/paradox/grpc.md +++ b/docs/src/main/paradox/grpc.md @@ -4,15 +4,6 @@ Akka Projection gRPC can be used for implementing asynchronous event based servi It provides an implementation of an Akka Projection that uses @extref:[Akka gRPC](akka-grpc:index.html) as underlying transport between event producer and consumer. -@@@ warning - -This module is currently marked as [May Change](https://doc.akka.io/docs/akka/current/common/may-change.html) -in the sense that the API might be changed based on feedback from initial usage. -However, the module is ready for usage in production and we will not break serialization format of -messages or stored data. - -@@@ - ## Overview ![overview.png](images/service-to-service-overview.png)