Skip to content

Commit

Permalink
update some random akka refs (apache#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning authored Feb 16, 2023
1 parent 5e8a278 commit 3ee028f
Show file tree
Hide file tree
Showing 49 changed files with 175 additions and 172 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PrimitivesSerializationSpec extends PekkoSpec(PrimitivesSerializationSpec.
}

"have right serializer id" in {
// checking because moved to akka-actor
// checking because moved to pekko-actor
serialization.serializerFor(1L.asInstanceOf[AnyRef].getClass).identifier === 18
}

Expand All @@ -102,7 +102,7 @@ class PrimitivesSerializationSpec extends PekkoSpec(PrimitivesSerializationSpec.
}

"have right serializer id" in {
// checking because moved to akka-actor
// checking because moved to pekko-actor
serialization.serializerFor(1L.asInstanceOf[AnyRef].getClass).identifier === 19
}
}
Expand All @@ -124,7 +124,7 @@ class PrimitivesSerializationSpec extends PekkoSpec(PrimitivesSerializationSpec.
}

"have right serializer id ($i)" in {
// checking because moved to akka-actor
// checking because moved to pekko-actor
serialization.serializerFor(true.asInstanceOf[AnyRef].getClass).identifier === 35
}
}
Expand All @@ -148,7 +148,7 @@ class PrimitivesSerializationSpec extends PekkoSpec(PrimitivesSerializationSpec.
}

"have right serializer id" in {
// checking because moved to akka-actor
// checking because moved to pekko-actor
serialization.serializerFor(1L.asInstanceOf[AnyRef].getClass).identifier === 20
}

Expand Down Expand Up @@ -178,7 +178,7 @@ class PrimitivesSerializationSpec extends PekkoSpec(PrimitivesSerializationSpec.
}

"have right serializer id" in {
// checking because moved to akka-actor
// checking because moved to pekko-actor
serialization.serializerFor(1L.asInstanceOf[AnyRef].getClass).identifier === 21
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class SerializeSpec extends PekkoSpec(SerializationTests.serializeConf) {
}

"log warning if non-Pekko serializer is configured for Pekko message" in {
EventFilter.warning(pattern = ".*not implemented by Pekko.*", occurrences = 1).intercept {
EventFilter.warning(pattern = ".*not implemented by Apache Pekko.*", occurrences = 1).intercept {
ser.serialize(new Other).get
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ class BoundedBlockingQueueSpec
val TestContext(queue, _, _, _, _, _) = newBoundedBlockingQueue(2)
val elems = List("Hello", "World")
elems.foreach(queue.put)
queue.containsAll(("Akka" :: elems).asJava) should equal(false)
queue.containsAll(("Pekko" :: elems).asJava) should equal(false)
}

"returns true if the queue contains exactly all elements" in {
Expand All @@ -590,7 +590,7 @@ class BoundedBlockingQueueSpec
val TestContext(queue, _, _, _, _, _) = newBoundedBlockingQueue(3)
val elems = List("Hello", "World")
elems.foreach(queue.put)
queue.put("Akka")
queue.put("Pekko")
queue.containsAll(elems.asJava) should equal(true)
}
}
Expand All @@ -600,20 +600,20 @@ class BoundedBlockingQueueSpec
val TestContext(queue, _, _, _, _, _) = newBoundedBlockingQueue(3)
val elems = List("Hello", "World")
elems.foreach(queue.put)
queue.put("Akka")
queue.put("Pekko")

queue.removeAll(elems.asJava) should equal(true)
queue.remainingCapacity() should equal(2)
queue.poll() should equal("Akka")
queue.poll() should equal("Pekko")
}

"return false if no elements were removed" in {
val TestContext(queue, _, _, _, _, _) = newBoundedBlockingQueue(1)
val elems = List("Hello", "World")
queue.put("Akka")
queue.put("Pekko")

queue.removeAll(elems.asJava) should equal(false)
queue.poll() should equal("Akka")
queue.poll() should equal("Pekko")
}
}

Expand All @@ -622,17 +622,17 @@ class BoundedBlockingQueueSpec
val TestContext(queue, _, _, _, _, _) = newBoundedBlockingQueue(3)
val elems = List("Hello", "World")
elems.foreach(queue.put)
queue.put("Akka")
queue.put("Pekko")

queue.retainAll(elems.asJava) should equal(true)
queue.remainingCapacity() should equal(1)
queue.toArray() shouldNot contain("Akka")
queue.toArray() shouldNot contain("Pekko")
queue.toArray() should contain theSameElementsAs elems
}

"return false if no elements were removed" in {
val TestContext(queue, _, _, _, _, _) = newBoundedBlockingQueue(2)
val elems = List("Hello", "World", "Akka")
val elems = List("Hello", "World", "Pekko")
queue.put("Hello")
queue.put("World")

Expand All @@ -650,7 +650,7 @@ class BoundedBlockingQueueSpec
"disallow remove() before calling next()" in {
val TestContext(queue, _, _, _, _, _) = newBoundedBlockingQueue(2)
queue.put("Hello")
queue.put("Akka")
queue.put("Pekko")

val iter = queue.iterator()
intercept[IllegalStateException] {
Expand All @@ -661,7 +661,7 @@ class BoundedBlockingQueueSpec
"disallow two subsequent remove()s" in {
val TestContext(queue, _, _, _, _, _) = newBoundedBlockingQueue(2)
queue.put("Hello")
queue.put("Akka")
queue.put("Pekko")

val iter = queue.iterator()
iter.next()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public static void main(String[] args) throws Exception {
ActorSystem.create(HelloWorldMain.create(), "hello");

system.tell(new HelloWorldMain.SayHello("World"));
system.tell(new HelloWorldMain.SayHello("Akka"));
system.tell(new HelloWorldMain.SayHello("Pekko"));
// #hello-world

Thread.sleep(3000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static void main(String[] args) throws Exception {
greetedReplyTo.whenComplete(
(greetedReplyToRef, exc2) -> {
if (exc2 == null) {
greeterRef.tell(new HelloWorld.Greet("Akka", greetedReplyToRef));
greeterRef.tell(new HelloWorld.Greet("Pekko", greetedReplyToRef));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ object IntroSpec {
ActorSystem(HelloWorldMain(), "hello")

system ! HelloWorldMain.SayHello("World")
system ! HelloWorldMain.SayHello("Akka")
system ! HelloWorldMain.SayHello("Pekko")
}
//#hello-world-main
}
Expand Down Expand Up @@ -260,7 +260,7 @@ class IntroSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike with LogC
ActorSystem(HelloWorldMain(), "hello")

system ! HelloWorldMain.SayHello("World")
system ! HelloWorldMain.SayHello("Akka")
system ! HelloWorldMain.SayHello("Pekko")

// #hello-world

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class SpawnProtocolDocSpec extends ScalaTestWithActorTestKit with AnyWordSpecLik
system.ask(SpawnProtocol.Spawn(greetedBehavior, name = "", props = Props.empty, _))

for (greeterRef <- greeter; replyToRef <- greetedReplyTo) {
greeterRef ! HelloWorld.Greet("Akka", replyToRef)
greeterRef ! HelloWorld.Greet("Pekko", replyToRef)
}

// #system-spawn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,109 +28,111 @@ import org.apache.pekko.annotation.InternalApi
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController created")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label("Delivery ProducerController created")
final class DeliveryProducerCreated(val producerId: String, val actorPath: String) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController started")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label("Delivery ProducerController started")
final class DeliveryProducerStarted(val producerId: String, val actorPath: String) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(false) // hi frequency event
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController sent RequestNext")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label("Delivery ProducerController sent RequestNext")
final class DeliveryProducerRequestNext(val producerId: String, val currentSeqNr: Long, val confirmedSeqNr: Long)
extends Event

/** INTERNAL API */
@InternalApi
@Enabled(false) // hi frequency event
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController sent SequencedMessage")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label("Delivery ProducerController sent SequencedMessage")
final class DeliveryProducerSent(val producerId: String, val seqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController waiting for demand")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label("Delivery ProducerController waiting for demand")
final class DeliveryProducerWaitingForRequest(val producerId: String, val currentSeqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController resent unconfirmed")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label("Delivery ProducerController resent unconfirmed")
final class DeliveryProducerResentUnconfirmed(val producerId: String, val fromSeqNr: Long, val toSeqNr: Long)
extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController resent first")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label("Delivery ProducerController resent first")
final class DeliveryProducerResentFirst(val producerId: String, val firstSeqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label(
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label(
"Delivery ProducerController resent first unconfirmed")
final class DeliveryProducerResentFirstUnconfirmed(val producerId: String, val seqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(false) // hi frequency event
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController received message")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label("Delivery ProducerController received message")
final class DeliveryProducerReceived(val producerId: String, val currentSeqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController received demand request")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label(
"Delivery ProducerController received demand request")
final class DeliveryProducerReceivedRequest(val producerId: String, val requestedSeqNr: Long, confirmedSeqNr: Long)
extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ProducerController")) @Label("Delivery ProducerController received resend request")
@Category(Array("Pekko", "Delivery", "ProducerController")) @Label(
"Delivery ProducerController received resend request")
final class DeliveryProducerReceivedResend(val producerId: String, val fromSeqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController created")
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController created")
final class DeliveryConsumerCreated(val actorPath: String) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController started")
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController started")
final class DeliveryConsumerStarted(val actorPath: String) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(false) // hi frequency event
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController received")
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController received")
final class DeliveryConsumerReceived(val producerId: String, val seqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(false) // hi frequency event
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label(
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label(
"Delivery ConsumerController received, previous in progress")
final class DeliveryConsumerReceivedPreviousInProgress(val producerId: String, val seqNr: Long, val stashed: Int)
extends Event
Expand All @@ -139,41 +141,41 @@ final class DeliveryConsumerReceivedPreviousInProgress(val producerId: String, v
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController received duplicate")
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController received duplicate")
final class DeliveryConsumerDuplicate(val producerId: String, val expectedSeqNr: Long, val seqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController received missing")
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController received missing")
final class DeliveryConsumerMissing(val producerId: String, val expectedSeqNr: Long, val seqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label(
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label(
"Delivery ConsumerController received expected resend")
final class DeliveryConsumerReceivedResend(val seqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController sent demand Request")
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController sent demand Request")
final class DeliveryConsumerSentRequest(val producerId: String, val requestedSeqNr: Long) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController producer changed")
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController producer changed")
final class DeliveryConsumerChangedProducer(val producerId: String) extends Event

/** INTERNAL API */
@InternalApi
@Enabled(true)
@StackTrace(false)
@Category(Array("Akka", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController stash is full")
@Category(Array("Pekko", "Delivery", "ConsumerController")) @Label("Delivery ConsumerController stash is full")
final class DeliveryConsumerStashFull(val producerId: String, val seqNr: Long) extends Event
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import pekko.util.JavaDurationConverters._
* To make sure the messages can be delivered also in that scenario the `ProducerController` can be
* used with a [[DurableProducerQueue]]. Then the unconfirmed messages are stored in a durable way so
* that they can be redelivered when the producer is started again. An implementation of the
* `DurableProducerQueue` is provided by `EventSourcedProducerQueue` in `akka-persistence-typed`.
* `DurableProducerQueue` is provided by `EventSourcedProducerQueue` in `pekko-persistence-typed`.
*
* Instead of using `tell` with the `sendNextTo` in the `RequestNext` the producer can use `context.ask`
* with the `askNextTo` in the `RequestNext`. The difference is that a reply is sent back when the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ import pekko.util.JavaDurationConverters._
* To make sure the messages can be delivered also in that scenario the `WorkPullingProducerController` can be
* used with a [[DurableProducerQueue]]. Then the unconfirmed messages are stored in a durable way so
* that they can be redelivered when the producer is started again. An implementation of the
* `DurableProducerQueue` is provided by `EventSourcedProducerQueue` in `akka-persistence-typed`.
* `DurableProducerQueue` is provided by `EventSourcedProducerQueue` in `pekko-persistence-typed`.
*
* Instead of using `tell` with the `sendNextTo` in the `RequestNext` the producer can use `context.ask`
* with the `askNextTo` in the `RequestNext`. The difference is that a reply is sent back when the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private[pekko] object TopicImpl {
final case class Subscribe[T](subscriber: ActorRef[T]) extends Topic.Command[T]
final case class Unsubscribe[T](subscriber: ActorRef[T]) extends Topic.Command[T]

// internal messages, note that the protobuf serializer for those sent remotely is defined in akka-cluster-typed
// internal messages, note that the protobuf serializer for those sent remotely is defined in pekko-cluster-typed
final case class GetTopicStats[T](replyTo: ActorRef[TopicStats]) extends Topic.Command[T]
final case class TopicStats(localSubscriberCount: Int, topicInstanceCount: Int) extends Topic.TopicStats
final case class TopicInstancesUpdated[T](topics: Set[ActorRef[TopicImpl.Command[T]]]) extends Command[T]
Expand Down
4 changes: 2 additions & 2 deletions actor/src/main/scala/org/apache/pekko/actor/ActorSystem.scala
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ object ActorSystem {
* INTERNAL API
*
* When using Akka Typed the Slf4jLogger should be used by default.
* Looking for config property `pekko.use-slf4j` (defined in akka-actor-typed) and
* that `Slf4jLogger` (akka-slf4j) is in classpath.
* Looking for config property `pekko.use-slf4j` (defined in pekko-actor-typed) and
* that `Slf4jLogger` (pekko-slf4j) is in classpath.
* Then adds `Slf4jLogger` to configured loggers and removes `DefaultLogger`.
*/
@InternalApi private[pekko] def amendSlf4jConfig(config: Config, dynamicAccess: DynamicAccess): Config = {
Expand Down
Loading

0 comments on commit 3ee028f

Please sign in to comment.