public CustomExecutionContext(ActorSystem actorSystem, String name) { this.executionContext = actorSystem.dispatchers().lookup(name); }
public CustomExecutionContext(ActorSystem actorSystem, String name) { this.executionContext = actorSystem.dispatchers().lookup(name); }
public CustomExecutionContext(ActorSystem actorSystem, String name) { this.executionContext = actorSystem.dispatchers().lookup(name); }
/** * Get dispatcher of this actor, which should be good for blocking operations. * * @param actorSystem actor system where this actor is configured. * @return the dispatcher. */ static MessageDispatcher getOwnDispatcher(final ActorSystem actorSystem) { return actorSystem.dispatchers().lookup(DISPATCHER_NAME); }
/** * Get dispatcher of this actor, which should be good for blocking operations. * * @param actorSystem actor system where this actor is configured. * @return the dispatcher. */ static MessageDispatcher getOwnDispatcher(final ActorSystem actorSystem) { return actorSystem.dispatchers().lookup(DISPATCHER_NAME); }
public LocalSnapshotStore(final Config config) { this.executionContext = context().system().dispatchers().lookup(config.getString("stream-dispatcher")); snapshotDir = new File(config.getString("dir")); int localMaxLoadAttempts = config.getInt("max-load-attempts"); maxLoadAttempts = localMaxLoadAttempts > 0 ? localMaxLoadAttempts : 1; LOG.debug("LocalSnapshotStore ctor: snapshotDir: {}, maxLoadAttempts: {}", snapshotDir, maxLoadAttempts); }
ExecutionContext dispatcher(final akka.dispatch.Dispatchers knownDispatchers) { if (knownDispatchers.hasDispatcher(path)) { return knownDispatchers.lookup(path); } return knownDispatchers.defaultGlobalDispatcher(); } }
public PushNotificationServerHelper(final ActorSystem actorSystem, final Configuration configuration) { this.dispatcher = actorSystem.dispatchers().lookup("restcomm-blocking-dispatcher"); final Configuration runtime = configuration.subset("runtime-settings"); this.pushNotificationServerEnabled = runtime.getBoolean("push-notification-server-enabled", false); if (this.pushNotificationServerEnabled) { this.pushNotificationServerUrl = runtime.getString("push-notification-server-url"); this.pushNotificationServerDelay = runtime.getLong("push-notification-server-delay"); } }
private ExecutionContext dispatcher(akka.dispatch.Dispatchers dispatchers){ if(dispatchers.hasDispatcher(path)){ return dispatchers.lookup(path); } return dispatchers.defaultGlobalDispatcher(); } }
private BlockedNamespaces(final DistributedDataConfigReader configReader, final ActorSystem system) { super(configReader, system, system.dispatchers().lookup(BLOCKED_NAMESPACES_DISPATCHER)); node = Cluster.get(system); }
private SearchActor(final ActorRef aggregationQueryActor, final ActorRef findQueryActor, final ThingsSearchPersistence searchPersistence) { this.aggregationQueryActor = aggregationQueryActor; this.findQueryActor = findQueryActor; this.searchPersistence = searchPersistence; materializer = ActorMaterializer.create(getContext().system()); dispatcher = getContext().system().dispatchers().lookup(SEARCH_DISPATCHER_ID); }
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()); }
self(), new ResumeProcessing(), context().system().dispatchers().lookup(asyncDispatcherName), self()); pipe(executionFlow(getState()).getAsyncOnCommand().get(command.getClass()).apply(command, ctx, getState()) .exceptionMsg(throwable.getLocalizedMessage()) .build()) .build()), context().system().dispatchers().lookup(asyncDispatcherName)) .pipeTo(self(), sender()); } else if (executionFlow(getState()).getOnCommand().get(command.getClass()) != null) {
CacheFactory.createCache(thingEnforcerIdCacheLoader, configReader.caches().id(), ID_CACHE_METRIC_NAME_PREFIX + ThingCommand.RESOURCE_TYPE, actorSystem.dispatchers().lookup("thing-id-cache-dispatcher")); CacheFactory.createCache(policyEnforcerCacheLoader, configReader.caches().enforcer(), ENFORCER_CACHE_METRIC_NAME_PREFIX + "policy", actorSystem.dispatchers().lookup("policy-enforcer-cache-dispatcher")); CacheFactory.createCache(aclEnforcerCacheLoader, configReader.caches().enforcer(), ENFORCER_CACHE_METRIC_NAME_PREFIX + "acl", actorSystem.dispatchers().lookup("acl-enforcer-cache-dispatcher")); final Executor enforcerExecutor = actorSystem.dispatchers().lookup(ENFORCER_DISPATCHER); final Props enforcerProps = EnforcerActorCreator.props(pubSubMediator, enforcementProviders, enforcementAskTimeout,