/** * Retrieve configuration reader of caches. * * @return the configuration reader. */ public CachesConfigReader caches() { return new CachesConfigReader(getChild(PATH_CACHES)); }
private ThingsAggregatorActor(final AbstractConciergeConfigReader configReader, final ActorRef targetActor) { this.targetActor = targetActor; aggregatorDispatcher = getContext().system().dispatchers().lookup(AGGREGATOR_INTERNAL_DISPATCHER); retrieveSingleThingTimeout = configReader.thingsAggregatorSingleRetrieveThingTimeout(); maxParallelism = configReader.thingsAggregatorMaxParallelism(); actorMaterializer = ActorMaterializer.create(getContext()); }
private <C extends AbstractConciergeConfigReader> ConciergeRootActor(final C configReader, final ActorRef pubSubMediator, final AbstractEnforcerActorFactory<C> authorizationProxyPropsFactory, final ActorMaterializer materializer) { requireNonNull(configReader); requireNonNull(pubSubMediator); requireNonNull(authorizationProxyPropsFactory); requireNonNull(materializer); final ActorContext context = getContext(); final ActorRef conciergeShardRegion = authorizationProxyPropsFactory.startEnforcerActor(context, configReader, pubSubMediator); retrieveStatisticsDetailsResponseSupplier = RetrieveStatisticsDetailsResponseSupplier.of(conciergeShardRegion, ConciergeMessagingConstants.SHARD_REGION, log); final ActorRef conciergeForwarder = startChildActor(context, ConciergeForwarderActor.ACTOR_NAME, ConciergeForwarderActor.props(pubSubMediator, conciergeShardRegion)); pubSubMediator.tell(new DistributedPubSubMediator.Put(getSelf()), getSelf()); pubSubMediator.tell(new DistributedPubSubMediator.Put(conciergeForwarder), getSelf()); startClusterSingletonActor(context, BatchSupervisorActor.ACTOR_NAME, BatchSupervisorActor.props(pubSubMediator, conciergeForwarder)); final ActorRef healthCheckingActor = startHealthCheckingActor(context, configReader); final HttpConfigReader httpConfig = configReader.http(); bindHttpStatusRoute(healthCheckingActor, httpConfig, materializer); }
private static ActorRef startHealthCheckingActor(final ActorContext context, final AbstractConciergeConfigReader configReader) { final HealthConfigReader healthConfig = configReader.health(); final HealthCheckingActorOptions.Builder hcBuilder = HealthCheckingActorOptions .getBuilder(healthConfig.enabled(), healthConfig.getInterval()); if (healthConfig.persistenceEnabled()) { hcBuilder.enablePersistenceCheck(); } final HealthCheckingActorOptions healthCheckingActorOptions = hcBuilder.build(); return startChildActor(context, DefaultHealthCheckingActorFactory.ACTOR_NAME, DefaultHealthCheckingActorFactory.props(healthCheckingActorOptions, MongoHealthChecker.props())); }
/** * Retrieve configuration reader of caches. * * @return the configuration reader. */ public CachesConfigReader caches() { return new CachesConfigReader(getChild(PATH_CACHES)); }
/** * Retrieve a configuration reader for enforcement settings. * * @return the configuration reader. */ public EnforcementConfigReader enforcement() { return new EnforcementConfigReader(getChild(PATH_ENFORCEMENT)); }
/** * Retrieve a configuration reader for enforcement settings. * * @return the configuration reader. */ public EnforcementConfigReader enforcement() { return new EnforcementConfigReader(getChild(PATH_ENFORCEMENT)); }