feat: Implement Actor Model pattern

* feat: Implement Actor Model pattern #3232

* feat: Implement Actor Model pattern #3232

* feat: update Actor Model implementation with multi-actor logic #3251

* feat: update Actor Model implementation with multi-actor logic and loose coupling  #3251

* test: add unit test for actor model #3251

* test: add test for App.java to increase coverage

* docs: add complete README for Actor Model pattern also implemented changes #3251
This commit is contained in:
ssrijan-007-sys
2025-04-22 23:59:58 +05:30
committed by GitHub
parent 1cde704bcb
commit fe522fd70d
12 changed files with 728 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

+35
View File
@@ -0,0 +1,35 @@
@startuml actor-model
title Actor Model - UML Class Diagram
class ActorSystem {
+actorOf(actor: Actor): Actor
+shutdown(): void
}
class Actor {
-mailbox: BlockingQueue<Message>
-active: boolean
+send(message: Message): void
+stop(): void
+run(): void
#onReceive(message: Message): void
}
class ExampleActor {
+onReceive(message: Message): void
}
class Message {
-content: String
-sender: Actor
+getContent(): String
+getSender(): Actor
}
ActorSystem --> Actor : creates
Actor <|-- ExampleActor : extends
Actor --> Message : processes
ExampleActor --> Message : uses
@enduml