doc: Cleanup serialization.md, #24717
This commit is contained in:
parent
ef09dca732
commit
f18d8af484
9 changed files with 156 additions and 82 deletions
|
|
@ -6,6 +6,7 @@ package docs.serialization {
|
|||
|
||||
//#imports
|
||||
import akka.actor._
|
||||
import akka.actor.typed.scaladsl.Behaviors
|
||||
import akka.cluster.Cluster
|
||||
import akka.serialization._
|
||||
|
||||
|
|
@ -210,6 +211,18 @@ package docs.serialization {
|
|||
shutdown(system)
|
||||
}
|
||||
|
||||
def demonstrateTypedActorSystem(): Unit = {
|
||||
//#programmatic-typed
|
||||
import akka.actor.typed.ActorSystem
|
||||
import akka.actor.typed.scaladsl.adapter._
|
||||
|
||||
val system = ActorSystem(Behaviors.empty, "example")
|
||||
|
||||
// Get the Serialization Extension
|
||||
val serialization = SerializationExtension(system.toClassic)
|
||||
//#programmatic-typed
|
||||
}
|
||||
|
||||
def demonstrateSerializationOfActorRefs(): Unit = {
|
||||
val theActorRef: ActorRef = system.deadLetters
|
||||
val extendedSystem: ExtendedActorSystem = system.asInstanceOf[ExtendedActorSystem]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue