Creates initial runtime config of scheduler state manager adaptor

@return adaptor config
760892
public Config createAdaptorRuntime(SchedulerStateManagerAdaptor adaptor) {
    return Config.newBuilder()
        .put(Key.SCHEDULER_STATE_MANAGER_ADAPTOR, adaptor).build();
  }
1150322
public function initRouterDi()
    {
        $config = $this->getConfig();
        if (!isset($config['router'])) {
            throw new Exception\RuntimeException('Cannot init DI for router. Cannot find router configuration');
        }
        $config = $config['router']->toArray();
        $router = new Router($this->diFactory);
        foreach ($config as $name => $routeInfo) {
            $router->addRoute($name, $routeInfo);
        }

        $this->diFactory->set('router', $router, true);

        return $this;
    }
534655
public alluxio.grpc.ScheduleAsyncPersistencePOptionsOrBuilder getOptionsOrBuilder() {
    return options_ == null ? alluxio.grpc.ScheduleAsyncPersistencePOptions.getDefaultInstance() : options_;
  }
842103
private String createConfiguration() {

        CmsResourceManager resManager = OpenCms.getResourceManager();
        if (resManager == null) {
            // can happen during the OpenCms startup
            return "";
        }
        List<I_CmsResourceType> resTypes = resManager.getResourceTypes();
        List<String> options = new ArrayList<String>();
        for (I_CmsResourceType resType : resTypes) {
            if (resType.isDirectEditable()) {
                options.add(resType.getTypeName());
            }
        }
        Collections.sort(options);
        return Joiner.on("|").join(options);
    }
535321
public ConfigProperty<Resourceadapter<T>> getOrCreateConfigProperty()
   {
      List<Node> nodeList = childNode.get("config-property");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ConfigPropertyImpl<Resourceadapter<T>>(this, "config-property", childNode, nodeList.get(0));
      }
      return createConfigProperty();
   }
1296187
public function createContainer()
    {
        if (empty($this->containerName)) {
            throw new DcGeneralRuntimeException('Required container name is missing');
        }

        if (null === $this->eventDispatcher) {
            throw new DcGeneralRuntimeException('Required event dispatcher is missing');
        }

        /** @var DataDefinitionContainerInterface $definitions */
        $definitions = System::getContainer()->get('cca.dc-general.data-definition-container');

        if ($definitions->hasDefinition($this->containerName)) {
            return clone $definitions->getDefinition($this->containerName);
        }

        /** @var ContainerInterface $dataContainer */
        $dataContainer = (new \ReflectionClass($this->containerClassName))->newInstance($this->containerName);

        // Backwards compatibility.
        $this->getEventDispatcher()->dispatch(
            BuildDataDefinitionEvent::NAME,
            new BuildDataDefinitionEvent($dataContainer)
        );

        $definitions->setDefinition($this->containerName, $dataContainer);

        return clone $dataContainer;
    }
525528
protected function setInitialResetters()
    {
        $app = $this->getBaseApp();

        $resetters = [
            ClearInstances::class,
            RebindHttpContainer::class,
            RebindRouterContainer::class,
            BindRequest::class,
            ResetConfig::class,
            ResetEvent::class,
        ];

        $resetters = array_merge($resetters, $this->config->get('swoole.resetters', []));

        foreach ($resetters as $resetter) {
            $resetterClass = $app->make($resetter);
            if (!$resetterClass instanceof ResetterContract) {
                throw new RuntimeException("{$resetter} must implement " . ResetterContract::class);
            }
            $this->resetters[$resetter] = $resetterClass;
        }
    }
839808
private JawrApplicationConfigManager initApplicationConfigManager() {

		JawrApplicationConfigManager appConfigMgr = (JawrApplicationConfigManager) servletContext
				.getAttribute(JawrConstant.JAWR_APPLICATION_CONFIG_MANAGER);
		if (appConfigMgr == null) {
			appConfigMgr = new JawrApplicationConfigManager();
			servletContext.setAttribute(JawrConstant.JAWR_APPLICATION_CONFIG_MANAGER, appConfigMgr);
		}

		// Create the config manager for the current Request Handler
		JawrConfigManager configMgr = new JawrConfigManager(this, jawrConfig.getConfigProperties());

		// Initialize the jawrApplicationConfigManager
		if (resourceType.equals(JawrConstant.JS_TYPE)) {
			appConfigMgr.setJsMBean(configMgr);
		} else if (resourceType.equals(JawrConstant.CSS_TYPE)) {
			appConfigMgr.setCssMBean(configMgr);
		} else {
			appConfigMgr.setBinaryMBean(configMgr);
		}
		return appConfigMgr;
	}
549864
public function startup()
    {
        $reflector = new ReflectionClass('Resque');
        $this->_resqueLibrary = dirname(dirname($reflector->getFileName()));

        $reflector = new ReflectionClass('ResqueScheduler\ResqueScheduler');
        $this->_resqueSchedulerLibrary = dirname(dirname(dirname($reflector->getFileName())));

        $this->ResqueStatus = new ResqueStatus(Resque::redis());

        $this->_io->styles('success', ['text' => 'green']);
        $this->_io->styles('bold', ['bold' => true]);
    }
792034
public static Factory newInstance() {
        ScheduledExecutorService scheduler = newSingleThreadScheduledExecutor(new ThreadFactory() {
            public Thread newThread(Runnable r) {
                Thread result = new Thread(r);
                result.setDaemon(true);
                return result;
            }
        });
        Properties props = new Properties();
        return new DefaultFactory(scheduler, props);
    }
681836
def initialize(self, runtime):
        """"""
        from .primitives import Id
        if self._runtime is not None:
            raise IllegalState('Manager has already been initialized')
        self._runtime = runtime
        config = runtime.get_configuration()
        parameter_id = Id('parameter:resourceProviderImpl@dlkit_service')
        provider_impl = config.get_value_by_parameter(parameter_id).get_string_value()
        if self._proxy is None:
            # need to add version argument
            self._provider_manager = runtime.get_manager('RESOURCE', provider_impl)
        else:
            # need to add version argument
            self._provider_manager = runtime.get_proxy_manager('RESOURCE', provider_impl)
1350329
public static function fromConfig()
	{
		$mailer = self::getInstance();

		$services = Config::get ('mailer.services');

		if (!$services) {
			return $mailer;
		}

		foreach ($services as $k => $v) {
			$service = MapperFactory::getServiceMapper()->getFromToken($k);
			if ($service) {
				$service->setFromConfig ($v);
				$mailer->addService ($service);
			}
		}

		return $mailer;
	}
1213454
protected function createDefaultFactory()
    {
        $loader = $this->loader ? : $this->createDefaultLoader();
        if ($this->hierarchy) {
            $loader = new HierarchicalNameLoader($loader);
        }
        $rootAdapter = $this->fallbackAdapter ? : $this->createDefaultFallbackAdapter();

        return new AdapterLoaderFactory($loader, $rootAdapter);
    }
840905
public static ServoAtlasConfig getAtlasConfig() {
    return new ServoAtlasConfig() {
      @Override
      public String getAtlasUri() {
        return getAtlasObserverUri();
      }

      @Override
      public int getPushQueueSize() {
        return 1000;
      }

      @Override
      public boolean shouldSendMetrics() {
        return isAtlasObserverEnabled();
      }

      @Override
      public int batchSize() {
        return 10000;
      }
    };
  }
752916
protected function createContainerBuilder()
    {
        $builder = new ContainerBuilder();
        $this->kernel->boot();
        foreach ($this->kernel->getBundles() as $bundle) {
            // Register all extensions, otherwise there might be config parts that cannot be processed.
            $extension = $bundle->getContainerExtension();
            if ($extension !== null) {
                $builder->registerExtension($extension);
            }
        }
        // Load the application configuration, which might affect the loaded services.
        /* @var $locator FileLocatorInterface */
        $locator = $this->kernel->getContainer()->get('file_locator');
        $loaders = array(
            new XmlFileLoader($builder, $locator),
            new YamlFileLoader($builder, $locator),
            new IniFileLoader($builder, $locator),
            new PhpFileLoader($builder, $locator),
            (class_exists(DirectoryLoader::class) ? new DirectoryLoader($builder, $locator) : null),
            new ClosureLoader($builder),
        );
        $loaders = array_filter($loaders);
        $resolver = new LoaderResolver($loaders);
        $loader = new DelegatingLoader($resolver);
        $this->kernel->registerContainerConfiguration($loader);
        return $builder;
    }
567238
public static String[] schedulerCommandArgs(
      Config config, Config runtime, List<Integer> freePorts) {
    // First let us have some safe checks
    if (freePorts.size() < PORTS_REQUIRED_FOR_SCHEDULER) {
      throw new RuntimeException("Failed to find enough ports for executor");
    }
    for (int port : freePorts) {
      if (port == -1) {
        throw new RuntimeException("Failed to find available ports for executor");
      }
    }

    int httpPort = freePorts.get(0);

    List<String> commands = new ArrayList<>();

    commands.add("--cluster");
    commands.add(Context.cluster(config));
    commands.add("--role");
    commands.add(Context.role(config));
    commands.add("--environment");
    commands.add(Context.environ(config));
    commands.add("--topology_name");
    commands.add(Context.topologyName(config));
    commands.add("--topology_bin");
    commands.add(Context.topologyBinaryFile(config));
    commands.add("--http_port");
    commands.add(Integer.toString(httpPort));

    return commands.toArray(new String[0]);
  }
296061
public static ValidatorConfiguration createExperimental() {
        Map<Check, Level> checks = getStandardChecks();

        checks.put(GdlArityCheck.INSTANCE, Level.ERROR);
        checks.put(GdlNotInRuleHeadCheck.INSTANCE, Level.ERROR);
        checks.put(UnrecognizedGdlArgumentCheck.INSTANCE, Level.WARNING);

        // (gdl random)
        checks.put(GdlRandomGoalCheck.INSTANCE, Level.ERROR);

        return new ValidatorConfiguration(checks);
    }