private void CreateCoordinator()
{
var typeNames = new[]
{
"counter", "rebalancingCounter", "PersistentCounterEntities", "AnotherPersistentCounter",
"PersistentCounter", "RebalancingPersistentCounter", "AutoMigrateRegionTest"
};
foreach (var typeName in typeNames)
{
var rebalanceEnabled = string.Equals(typeName, "rebalancing", StringComparison.InvariantCultureIgnoreCase);
var singletonProps = Props.Create(() => new BackoffSupervisor(
CoordinatorProps(typeName, rebalanceEnabled),
"coordinator",
TimeSpan.FromSeconds(5),
TimeSpan.FromSeconds(5),
0.1)).WithDeploy(Deploy.Local);
Sys.ActorOf(ClusterSingletonManager.Props(
singletonProps,
PoisonPill.Instance,
ClusterSingletonManagerSettings.Create(Sys)),
typeName + "Coordinator");
}
}