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");
}