public RegionManager(final PersistenceManager pm, final ServerConfiguration cfg, final ZooKeeper zk,
ScheduledExecutorService scheduler, HedwigHubClientFactory hubClientFactory) {
this.pm = pm;
mySubId = ByteString.copyFromUtf8(SubscriptionStateUtils.HUB_SUBSCRIBER_PREFIX + cfg.getMyRegion());
queue = new TopicOpQueuer(scheduler);
for (final String hub : cfg.getRegions()) {
clients.add(hubClientFactory.create(new HedwigSocketAddress(hub)));
}
myRegion = cfg.getMyRegionByteString().toStringUtf8();
if (cfg.getRetryRemoteSubscribeThreadRunInterval() > 0) {