Supervisor DSL doesn't make much sense after the introduction of Props
Since it will not be possible to change supervisor after creation and the supervisor is supplied in the Props, it doesn't make sense with the Supervisor DSL:
Example:
servers foreach {
case Supervise(actorRef, lifeCycle, registerAsRemoteService) ⇒
actorRef.lifeCycle = lifeCycle //<----- WE CAN'T CHANGE LIFECYCLE AFTER THE ACTORREF HAS BEEN CREATED
supervisor.link(actorRef) //<------- LINK WILL BE FOR LIFECYCLE MONITORING ONLY, NOT SUPERVISION
actorRef.start() //<-------- ACTORREFS WILL BE STARTED AUTOMATICALLY AT CREATION ANYWAY
childActors.add(actorRef) //TODO Why do we keep this here, mem leak?
if (ClusterModule.isEnabled && registerAsRemoteService)
Actor.remote.register(actorRef) // <------ WHAT DOES SUPERVISION CONFIG HAVE TO DO WITH REMOTING ANYWAY?
case supervisorConfig @ SupervisorConfig(, _, _) ⇒ // recursive supervisor configuration
val childSupervisor = Supervisor(supervisorConfig)
supervisor.link(childSupervisor.supervisor)
_childSupervisors.add(childSupervisor)
}
Example:
servers foreach {
case Supervise(actorRef, lifeCycle, registerAsRemoteService) ⇒
actorRef.lifeCycle = lifeCycle //<----- WE CAN'T CHANGE LIFECYCLE AFTER THE ACTORREF HAS BEEN CREATED
supervisor.link(actorRef) //<------- LINK WILL BE FOR LIFECYCLE MONITORING ONLY, NOT SUPERVISION
actorRef.start() //<-------- ACTORREFS WILL BE STARTED AUTOMATICALLY AT CREATION ANYWAY
childActors.add(actorRef) //TODO Why do we keep this here, mem leak?
if (ClusterModule.isEnabled && registerAsRemoteService)
Actor.remote.register(actorRef) // <------ WHAT DOES SUPERVISION CONFIG HAVE TO DO WITH REMOTING ANYWAY?
case supervisorConfig @ SupervisorConfig(, _, _) ⇒ // recursive supervisor configuration
val childSupervisor = Supervisor(supervisorConfig)
supervisor.link(childSupervisor.supervisor)
_childSupervisors.add(childSupervisor)
}
Leave a comment
Removed in master
Updating tickets (#967, #974, #975, #976, #980, #981, #989, #990, #992, #993, #994, #999, #1000, #1004, #1008, #1011, #1015, #1018, #1022, #1023, #1024, #1025, #1027, #1028, #1029, #1030, #1032, #1033, #1036, #1047, #1053, #1062, #1067, #1068, #1069, #1072, #1075, #1078, #1082, #1102, #1107, #1110, #1111, #1115, #1116, #1121, #1122, #1123, #1124)