* fix: keep typed ask deadletter same as classic
* fix: compile on scala3
* fix: a more convincing test
* chore: remove unnecessary header
* chore: use raw apache license
* chore: grammar and sort imports
* chore: grammar fix
* chore: copyright
* fix: immutable object domain
* fix: make it simple
- Use InteractionPatternsSpec as an example for applying Scala 3's
Union types to symplify actor code
- Remove response message wrapper & adapter
- Use the union of the actor's public protocol (the `Translate`
message (the only member of the `Command` ADT) and the possible
responses from the backend (messages `JobStarted`, `JobProgress`,
and `JobCompleted`): `private type CommandAndResponse = Command | Backend.Response`
- Instead of utilising the message adaptor `ActorRef` in the `replyTo`
field of the message sent to the backend, `context.self` is used
instead
- The internal (extended) `Behavior[CommandAndResponse]` is narrowed
to `Behavior[Command]` at creation time
The diffs between the original and the new version:
```bash
136d139
< private final case class WrappedBackendResponse(response: Backend.Response) extends Command
137a141,142
> private type CommandAndResponse = Command | Backend.Response
>
139,141c144
< Behaviors.setup[Command] { context =>
< val backendResponseMapper: ActorRef[Backend.Response] =
< context.messageAdapter(rsp => WrappedBackendResponse(rsp))
---
> Behaviors.setup[CommandAndResponse] { context =>
143,144c146,147
< def active(inProgress: Map[Int, ActorRef[URI]], count: Int): Behavior[Command] = {
< Behaviors.receiveMessage[Command] {
---
> def active(inProgress: Map[Int, ActorRef[URI]], count: Int): Behavior[CommandAndResponse] = {
> Behaviors.receiveMessage[CommandAndResponse] {
147c150
< backend ! Backend.StartTranslationJob(taskId, site, backendResponseMapper)
---
> backend ! Backend.StartTranslationJob(taskId, site, context.self)
150,162c153,162
< case wrapped: WrappedBackendResponse =>
< wrapped.response match {
< case Backend.JobStarted(taskId) =>
< context.log.info("Started {}", taskId)
< Behaviors.same
< case Backend.JobProgress(taskId, progress) =>
< context.log.info2("Progress {}: {}", taskId, progress)
< Behaviors.same
< case Backend.JobCompleted(taskId, result) =>
< context.log.info2("Completed {}: {}", taskId, result)
< inProgress(taskId) ! result
< active(inProgress - taskId, count)
< }
---
> case Backend.JobStarted(taskId) =>
> context.log.info("Started {}", taskId)
> Behaviors.same
> case Backend.JobProgress(taskId, progress) =>
> context.log.info2("Progress {}: {}", taskId, progress)
> Behaviors.same
> case Backend.JobCompleted(taskId, result) =>
> context.log.info2("Completed {}: {}", taskId, result)
> inProgress(taskId) ! result
> active(inProgress - taskId, count)
167c167
< }
---
> }.narrow
```
* Create MapAsyncPartition.scala
add license
add test
Update LICENSE
try to fix test
* Update MapAsyncPartitionSpec.scala
wip
Update MapAsyncPartition.scala
wip
* changes to get code to compile with scala 2.12
* more tests
scalafmt
* Update MapAsyncPartition.scala
* make code more closely match the Akka API
java
Update Flow.scala
more java api
* Add ordered version of the operator
* Fix formatting
* update docs
* test null function result
* java api
* add back code to get scala 2.12 compile working again
* Unify mapAsyncPartitioned implementations
* remove special license
Update CopyrightHeader.scala
* java tests
javafmt
* update docs
update tests
update javadoc
---------
Co-authored-by: Jacek Sokol <jacek@scalabs.pl>
* !remoting Update classic transport from Netty 3 to netty4
* use lambda
* =sbt Update Netty4 version to 4.1.97.final
* Reduce allocation in ChannelLocalActor.
* Remove the duplicated code in NettyHelpers.