@@ -10,31 +10,41 @@ package app.softnetwork {
1010 +<<recursive >>retry (n : Int )(fn : => Future [T ]): Future[T]
1111 }
1212 }
13- package persistence . typed . scaladsl {
14- abstract Patterns <C : Command , R : CommandResult > <<(T ,orchid ) trait >>{
15- <<type >> Recipient
16- <<implicit >> command2Request (command : C ): ActorRef [R ] => C
17- timeout : Timeout
18- - recipientRef (recipient : Recipient): akka.actor.typed.RecipientRef[C]
19- +?(recipient : Recipient , command : C ): Future [R ] = recipientRef (recipient ) ? command
20- +!(recipient : Recipient , command : C ): Unit = recipientRef (recipient ) ! command
21- <<implicit >> key2Recipient [T ](key : T ): Recipient
22- #lookup [T ](key : T ): Future [Option [Recipient ]]
23- +??[T ](key : T , command : C ): Future [R ]
24- +?: Unit
25- +*?[T ](keys : List [T ], command : C ): Future [List [R ]]
26- +*: Unit
13+ package persistence . typed {
14+ abstract class CommandTypeKey <C : Command > <<(T ,orchid ) trait >> {
15+ +def TypeKey (implicit c : ClassTag [C ]): EntityTypeKey [C ]
2716 }
28- Retryable <|-- Patterns : <<bind>> <R -> T>
29- abstract EntityPattern <C : Command , R : CommandResult > <<(T ,orchid ) trait >> extends Patterns {
30- <<type >> Recipient = String
17+ note left of CommandTypeKey ::TypeKey
18+ A key that uniquely identifies
19+ the type of entity in the cluster
20+ end note
21+ package scaladsl {
22+ abstract Patterns <C : Command , R : CommandResult > <<(T ,orchid ) trait >>{
23+ <<type >> Recipient
24+ <<implicit >> command2Request (command : C ): ActorRef [R ] => C
25+ timeout : Timeout
26+ - recipientRef (recipient : Recipient): akka.actor.typed.RecipientRef[C]
27+ +?(recipient : Recipient , command : C ): Future [R ] = recipientRef (recipient ) ? command
28+ +!(recipient : Recipient , command : C ): Unit = recipientRef (recipient ) ! command
29+ <<implicit >> key2Recipient [T ](key : T ): Recipient
30+ #lookup [T ](key : T ): Future [Option [Recipient ]]
31+ +??[T ](key : T , command : C ): Future [R ]
32+ +?: Unit
33+ +*?[T ](keys : List [T ], command : C ): Future [List [R ]]
34+ +*: Unit
35+ }
36+ Retryable <|-- Patterns : <<bind>> <R -> T>
37+ abstract EntityPattern <C : Command , R : CommandResult > <<(T ,orchid ) trait >> extends Patterns {
38+ <<type >> Recipient = String
39+ }
40+ CommandTypeKey <|.. EntityPattern : <<self>>
41+ abstract SingletonPattern <C : Command , R : CommandResult > <<(T ,orchid ) trait >> extends Patterns
42+ class RecipientPattern {
43+ entityId : String
44+ ref(): EntityRef[C]
45+ }
46+ EntityPattern +-- RecipientPattern : <<implicit>>
3147 }
32- abstract SingletonPattern <C : Command , R : CommandResult > <<(T ,orchid ) trait >> extends Patterns
33- class RecipientPattern {
34- entityId : String
35- ref(): EntityRef[C]
36- }
37- EntityPattern +-- RecipientPattern : <<implicit>>
3848 }
3949}
4050@enduml
0 commit comments