Migrate to Empty.value()
[controller.git] / opendaylight / md-sal / eos-dom-akka / src / main / java / org / opendaylight / controller / eos / akka / bootstrap / EOSMain.java
index be1415ed5bf7a1f2e1f0d6b603ba07f4a1ca1447..83d28823ad81453385936eef754ea563e1c9cfcd 100644 (file)
@@ -43,13 +43,14 @@ public final class EOSMain extends AbstractBehavior<BootstrapCommand> {
         final String role = Cluster.get(context.getSystem()).selfMember().getRoles().iterator().next();
 
         listenerRegistry = context.spawn(EntityTypeListenerRegistry.create(role), "ListenerRegistry");
-        candidateRegistry = context.spawn(CandidateRegistryInit.create(), "CandidateRegistry");
 
         final ClusterSingleton clusterSingleton = ClusterSingleton.get(context.getSystem());
         // start the initial sync behavior that switches to the regular one after syncing
         ownerSupervisor = clusterSingleton.init(
                 SingletonActor.of(IdleSupervisor.create(iidCodec), "OwnerSupervisor"));
 
+        candidateRegistry = context.spawn(CandidateRegistryInit.create(ownerSupervisor), "CandidateRegistry");
+
         ownerStateChecker = context.spawn(OwnerStateChecker.create(role, ownerSupervisor, iidCodec),
                 "OwnerStateChecker");
     }
@@ -73,7 +74,7 @@ public final class EOSMain extends AbstractBehavior<BootstrapCommand> {
     }
 
     private Behavior<BootstrapCommand> onTerminate(final Terminate request) {
-        request.getReplyTo().tell(Empty.getInstance());
+        request.getReplyTo().tell(Empty.value());
         return Behaviors.stopped();
     }
 }
\ No newline at end of file