Call this to configure a KryoFactory type before initializing Fluo.
769045
public static void setKryoFactory(FluoConfiguration config, String factoryType) {
    config.getAppConfiguration().setProperty(KRYO_FACTORY_PROP, factoryType);
  }
717896
def _init_io_module():
    """"""
    plist = ctypes.POINTER(ctypes.c_void_p)()
    size = ctypes.c_uint()
    check_call(_LIB.MXListDataIters(ctypes.byref(size), ctypes.byref(plist)))
    module_obj = sys.modules[__name__]
    for i in range(size.value):
        hdl = ctypes.c_void_p(plist[i])
        dataiter = _make_io_iterator(hdl)
        setattr(module_obj, dataiter.__name__, dataiter)
1073911
@PostConstruct
	@SuppressWarnings("unchecked")
	protected void configure() {

		// scan all fields
		for (Field field : getClass().getDeclaredFields()) {

			// if it's a preprocessor, register it
			if (IModifier.class.isAssignableFrom(field.getType())) {

				try {
					field.setAccessible(true);
					final IModifier processor = (IModifier) field.get(this);
					processorsCache.put(processor.getAnnotationType(), processor);
				} catch (IllegalArgumentException | IllegalAccessException ex) {
					LoggerFactory.getLogger(ModifiersPreprocessor.class) .error("Could not register pre-processor for field " + field.getName());
				}
			}
		}
	}
1252483
public void initialize(URI name, Configuration conf) throws IOException {
    // if an underlying fs has not already been specified,
    // create and initialize one
    if (this.fs == null) {
      Class<?> clazz = conf.getClass("fs.apitrace.underlyingfs.impl",
                                     DistributedFileSystem.class);
      if (clazz == null) {
        throw new IOException("No FileSystem for fs.apitrace.underlyingfs.impl.");
      }

      this.fs = (FileSystem)ReflectionUtils.newInstance(clazz, null);
      super.initialize(name, conf);
    }

    // trace conf options
    for (String opt : traceConfOpts) {
      APITrace.CallEvent ce = new APITrace.CallEvent();
      ce.logCall(APITrace.COMMENT_msg, null,
                 new Object[] {opt, conf.get(opt, "")});
    }
  }
1019539
public void initialize(URI name, Configuration conf) throws IOException {
    fs.initialize(name, conf);
  }
304062
public static void preRegister(Context context) {
        context.put(FSInfo.class, new Context.Factory<FSInfo>() {
            public FSInfo make(Context c) {
                FSInfo instance = new CacheFSInfo();
                c.put(FSInfo.class, instance);
                return instance;
            }
        });
    }
913059
def init_config(self, app):
        """"""
        for k in dir(config):
            if k.startswith('JSONSCHEMAS_'):
                app.config.setdefault(k, getattr(config, k))

        host_setting = app.config['JSONSCHEMAS_HOST']
        if not host_setting or host_setting == 'localhost':
            app.logger.warning('JSONSCHEMAS_HOST is set to {0}'.format(
                host_setting))
93608
protected function registerGlobalReactorOptions(): void
	{
		$this->reactor->registerGlobalOption('env', 'Overrides the Mako environment', function(Config $config, $option): void
		{
			putenv('MAKO_ENV=' . $option);

			$config->setEnvironment($option);
		}, 'init');

		$this->reactor->registerGlobalOption('mute', 'Mutes all output', function(Output $output): void
		{
			$output->mute();
		}, 'init');
	}
572835
private final void init(boolean forEncryption, byte[] key)
	{
		WorkingKey = generateWorkingKey(key, forEncryption);
		this.klen = key.length;
		this.doEncrypt = forEncryption;
	}
26567
public function beforeCompile(): void
	{
		// Skip if it's not CLI mode
		if (!$this->cliMode) {
			return;
		}

		$builder = $this->getContainerBuilder();

		// Lookup for Symfony Console Application
		$application = $builder->getDefinitionByType(Application::class);

		// Register helpers
		$entityManagerHelper = $this->prefix('@entityManagerHelper');
		$application->addSetup(new Statement('$service->getHelperSet()->set(?,?)', [$entityManagerHelper, 'em']));
	}
321477
def register_cffi_externs(self):
    """"""
    for field_name, _ in self._extern_fields.items():
      bound_method = getattr(self, field_name)
      self._ffi.def_extern()(bound_method)
589705
public void initialize(URI name, Configuration conf) throws IOException {
    this.conf = conf;

    Class<?> clazz = conf.getClass("fs.lookasidecache.underlyingfs.impl",
        DistributedFileSystem.class);
    if (clazz == null) {
      throw new IOException("No FileSystem for " +
                            "fs.lookasidecache.underlyingfs.impl.");
    }

    this.fs = (FileSystem)ReflectionUtils.newInstance(clazz, null);
    super.initialize(name, conf);

    // find configured cache directory
    cacheDir = conf.get("fs.lookasidecache.dir");
    if (cacheDir == null) {
      LOG.info("fs.lookasidecache.dir is not defined");
      return;
    }
    cacheDir += "/" + System.currentTimeMillis();
    cachePath = new Path(cacheDir);
    assert cachePath.isAbsolute();
    cacheURI = URI.create("file:///" + cacheDir);

    if (cacheURI == null) {
      LOG.info("fs.lookasidecache.dir is not defined");
      return;
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("CacheDir is " + cacheURI);
    }

    // create an instance of a RawLocalFileSystem to read from the cache
    cacheFs = new RawLocalFileSystem();
    cacheFs.initialize(cacheURI, conf);

    // Create the cachedir if it does not exist
    // There could be pre-exisiting files in the cachedir, do not do
    // anything to them. They will not be served by this cache, but they
    // will not be deleted by this cache either.
    cacheFs.mkdirs(cachePath);

    // create a lookaside cache
    lookasideCache = new LookasideCache(conf, this);

    // create a metrics updater object
    metrics = new LookasideMetrics();
  }
418217
def init_app(self, app):
        """"""
        self.init_config(app)
        app.cli.add_command(classifier_cmd)
        app.extensions['invenio-classifier'] = self
127978
def _init_kvstore_server_module():
    """"""
    is_worker = ctypes.c_int()
    check_call(_LIB.MXKVStoreIsWorkerNode(ctypes.byref(is_worker)))
    if is_worker.value == 0:
        kvstore = create('dist')
        server = KVStoreServer(kvstore)
        server.run()
        sys.exit()
185855
public function initializeObject()
    {
        if ($this->cache->has('typeConverterMap')) {
            $this->typeConverters = $this->cache->get('typeConverterMap');
            return;
        }

        $this->typeConverters = $this->prepareTypeConverterMap();
        $this->cache->set('typeConverterMap', $this->typeConverters);
    }
310581
protected function initDefaultInitialContext()
    {

        // initialize the configuration values for the initial context
        $description = new DescriptionNode(new NodeValue('The initial context configuration.'));
        $storage = new StorageNode('AppserverIo\Storage\StackableStorage');

        // set the default initial context configuration
        $this->initialContext = new InitialContextNode('AppserverIo\Appserver\Core\InitialContext', $description, $storage);
    }
251050
protected function beforeInit()
	{
	    // load default config
	    Config::setDefault(DefaultConfig::common());
	    
	    // load common config: /common/config/config.php
	    Config::load('config');
	    
	    // autoload common class: /common/src/...
	    $ns = Config::getCommon('commonNamespace', 'Common');
	    $ns = trim($ns, '\\') . '\\';
	    Ioc::loader()->setPsr4($ns, Config::getCommonPath() . 'src');
	    
	    // init namespaces: load or init
	    Ioc::initNamespace();
	}