Initialize a new StorageBackend by it's name and the specified model registry.
767502
def create_backend(name: str=None, git_index: GitIndex=None, args: str=None) -> StorageBackend:
    """"""
    if name is None:
        name = config.BACKEND
    if not args:
        args = config.BACKEND_ARGS
    if args:
        try:
            kwargs = dict(p.split("=") for p in args.split(","))
        except:  # flake8: noqa
            raise ValueError("Invalid args") from None
    else:
        kwargs = {}
    if git_index is None:
        git_index = GitIndex()
    kwargs["index"] = git_index
    return __registry__[name](**kwargs)
721276
private function init()
    {
        foreach ($this->get(Registry::class)->get('services', []) as $name => $definition) {
            $this->set($name, $definition);
        }
    }
584761
def _initialize(self, chain, length):
        """"""
        # If this db was loaded from the disk, it may not have its
        # tallied step methods' getfuncs yet.
        if self._getfunc is None:
            self._getfunc = self.db.model._funs_to_tally[self.name]
290907
private void init() {
        logger.info("metadata init().");

        writeLock.lock();
        try {
        // Required keys
        initCache(CLUSTER_KEY);

        // If stores definition storage engine is not null, initialize metadata
        // Add the mapping from key to the storage engine used
        if(this.storeDefinitionsStorageEngine != null) {
            initStoreDefinitions(null);
        } else {
            initCache(STORES_KEY);
        }

        // Initialize system store in the metadata cache
        initSystemCache();
        initSystemRoutingStrategies(getCluster());

        // Initialize with default if not present
        initCache(SLOP_STREAMING_ENABLED_KEY, true);
        initCache(PARTITION_STREAMING_ENABLED_KEY, true);
        initCache(READONLY_FETCH_ENABLED_KEY, true);
        initCache(QUOTA_ENFORCEMENT_ENABLED_KEY, true);
        initCache(REBALANCING_STEAL_INFO, new RebalancerState(new ArrayList<RebalanceTaskInfo>()));
        initCache(SERVER_STATE_KEY, VoldemortState.NORMAL_SERVER.toString());
        initCache(REBALANCING_SOURCE_CLUSTER_XML, null);
        initCache(REBALANCING_SOURCE_STORES_XML, null);


        } finally {
            writeLock.unlock();
        }
    }
940311
def store_with(name, storage_id = nil, &block)
      @storages << get_class_from_scope(Storage, name)
        .new(self, storage_id, &block)
    end
889535
public void init(final SerializedDataTypeRegistry typeRegistry, final DeserializerRegistry deserRegistry,
            final SerializerRegistry serRegistry) {
        if (initialized) {
            throw new IllegalStateException("Instance already initialized - Don't call the init methods more than once");
        }
        this.typeRegistry = typeRegistry;
        for (final JsonbDeserializer<?> deserializer : deserializers) {
            if (deserializer instanceof DeserializerRegistryRequired) {
                if (deserRegistry == null) {
                    throw new IllegalStateException(
                            "There is at least one deserializer that requires a 'DeserializerRegistry', but you didn't provide one (deserializer="
                                    + deserializer.getClass().getName() + ")");
                }
                final DeserializerRegistryRequired des = (DeserializerRegistryRequired) deserializer;
                des.setRegistry(deserRegistry);
            }
            if (deserializer instanceof SerializedDataTypeRegistryRequired) {
                if (typeRegistry == null) {
                    throw new IllegalStateException(
                            "There is at least one deserializer that requires a 'SerializedDataTypeRegistry', but you didn't provide one (deserializer="
                                    + deserializer.getClass().getName() + ")");
                }
                final SerializedDataTypeRegistryRequired des = (SerializedDataTypeRegistryRequired) deserializer;
                des.setRegistry(typeRegistry);
            }
        }
        for (final JsonbSerializer<?> serializer : serializers) {
            if (serializer instanceof SerializerRegistryRequired) {
                if (serRegistry == null) {
                    throw new IllegalStateException(
                            "There is at least one serializer that requires a 'SerializerRegistry', but you didn't provide one (serializer="
                                    + serializer.getClass().getName() + ")");
                }
                final SerializerRegistryRequired ser = (SerializerRegistryRequired) serializer;
                ser.setRegistry(serRegistry);
            }
            if (serializer instanceof SerializedDataTypeRegistryRequired) {
                if (typeRegistry == null) {
                    throw new IllegalStateException(
                            "There is at least one serializer that requires a 'SerializedDataTypeRegistry', but you didn't provide one (serializer="
                                    + serializer.getClass().getName() + ")");
                }
                final SerializedDataTypeRegistryRequired ser = (SerializedDataTypeRegistryRequired) serializer;
                ser.setRegistry(typeRegistry);
            }
        }
        initialized = true;
    }
891643
public void save(String storageName) {
        //store the objects on storage
        storageEngine.saveObject("modelParameters", modelParameters);
        storageEngine.saveObject("trainingParameters", trainingParameters);

        //rename the storage
        storageEngine.rename(storageName);

        //reload the model parameters, necessary for the maps to point to the new location
        modelParameters = (MP) storageEngine.loadObject("modelParameters", ModelParameters.class);
    }
204126
private void init() {
    ServerSideServerStore serverStore = ehcacheStateService.getStore(storeIdentifier);
    ServerStoreBinding serverStoreBinding = new ServerStoreBinding(storeIdentifier, serverStore);
    CompletableFuture<Void> r1 = managementRegistry.register(serverStoreBinding);
    ServerSideConfiguration.Pool pool = ehcacheStateService.getDedicatedResourcePool(storeIdentifier);
    CompletableFuture<Void> allOf;
    if (pool != null) {
      allOf = CompletableFuture.allOf(r1, managementRegistry.register(new PoolBinding(storeIdentifier, pool, PoolBinding.AllocationType.DEDICATED)));
    } else {
      allOf = r1;
    }
    allOf.thenRun(() -> {
      managementRegistry.refresh();
      managementRegistry.pushServerEntityNotification(serverStoreBinding, EHCACHE_SERVER_STORE_CREATED.name());
    });
  }
1125544
def _init_object(self, catalog_id, proxy, runtime, cat_name, cat_class):
        """"""
        self._catalog_identifier = None
        self._init_proxy_and_runtime(proxy, runtime)
        self._catalog = cat_class(self._my_catalog_map)
        self._catalog._authority = self._authority  # there should be a better way...
        self._catalog_id = self._catalog.get_id()
        self._forms = dict()
280177
def _init_datastores():
    
    global _DATASTORES
    array = settings.DATASTORES
    for config in array:
        cls = _lookup(config['ENGINE'])
        ds = _get_datastore(cls, DataStore, config)
        _DATASTORES.append(ds)
    legacy_settings = getattr(settings, 'MACHINE_CATEGORY_DATASTORES', None)
    if legacy_settings is not None:
        warnings.warn(
            "MACHINE_CATEGORY_DATASTORES is deprecated, "
            "please change to use DATASTORES",
        )
        for name in ['ldap']:
            array = settings.MACHINE_CATEGORY_DATASTORES.get(name, [])
            for config in array:
                cls = _lookup(config['ENGINE'])
                ds = _get_datastore(cls, DataStore, config)
                _DATASTORES.append(ds)
846576
private synchronized void initialize() {
        Iterator types = EntityTypesLocator.getEntityTypes().getAllEntityTypes();
        String factoryName = null;

        while (types.hasNext()) {
            Class type = (Class) types.next();
            if (type != Object.class) {
                String factoryKey =
                        "org.apereo.portal.services.EntityNameFinderService.NameFinderFactory.implementation_"
                                + type.getName();
                try {
                    factoryName = PropertiesManager.getProperty(factoryKey);
                } catch (Exception runtime) {
                    String dMsg =
                            "EntityNameFinderService.initialize(): "
                                    + "could not find property for "
                                    + type.getName()
                                    + " factory.";
                    log.debug(dMsg);
                }
                if (factoryName != null) {
                    try {
                        IEntityNameFinderFactory factory =
                                (IEntityNameFinderFactory) Class.forName(factoryName).newInstance();
                        getNameFinders().put(type, factory.newFinder());
                    } catch (Exception e) {
                        String eMsg =
                                "EntityNameFinderService.initialize(): "
                                        + "Could not instantiate finder for "
                                        + type.getName()
                                        + ": ";
                        log.error(eMsg, e);
                    }
                }
            }
        }
        setInitialized(true);
    }
644482
public static function init()
    {

        // Initialize format drivers
        foreach (glob(implode(DIRECTORY_SEPARATOR, array(__DIR__,'Format','*.php'))) as $filename) {

            $filename = explode(DIRECTORY_SEPARATOR, $filename);
            $filename = explode('.',array_pop($filename));
            array_pop($filename);
            $filename = implode('.', $filename);

            if($filename == 'FormatInterface') continue;

            $className = explode("\\",__CLASS__);
            array_pop($className);
            array_push($className, 'Format');
            array_push($className, $filename);
            $className = implode('\\', $className);

            self::registerFormat($className);
        }

        // Initialize storage drivers
        foreach (glob(implode(DIRECTORY_SEPARATOR, array(__DIR__,'Storage','*.php'))) as $filename) {

            $filename = explode(DIRECTORY_SEPARATOR, $filename);
            $filename = explode('.',array_pop($filename));
            array_pop($filename);
            $filename = implode('.', $filename);

            if($filename == 'StorageInterface') continue;

            $className = explode("\\",__CLASS__);
            array_pop($className);
            array_push($className, 'Storage');
            array_push($className, $filename);
            $className = implode('\\', $className);

            self::registerStorage($className);
        }
    }
1058879
private void initStandaAloneServices() {
        Set<String> serviceSet = new LinkedHashSet<>();
        addDefaultServices(serviceSet);
        addRequiredServices(serviceSet);
        addConfiguredStorageServices(serviceSet);
        initServices(serviceSet);
    }
715587
def register_model(self, storagemodel:object):
        

        modeldefinition = self.getmodeldefinition(storagemodel, False)

        if modeldefinition is None:

            """ test if queuename already exists """
            if [model for model in self._modeldefinitions if model['tablename'] == storagemodel._tablename]:
                raise NameConventionError(storagemodel._tablename)

            """ test if queuename fits to azure naming rules """
            if not test_azurestorage_nameconventions(storagemodel._tablename, 'StorageTableModel'):
                raise NameConventionError(storagemodel._tablename)            
                
            """ now register model """
            modeldefinition = {
                'modelname': storagemodel.__class__.__name__,
                'tablename': storagemodel._tablename,
                'encrypt': storagemodel._encrypt,
                'tableservice': self._account.create_table_service()
                }

            if modeldefinition['encrypt']:
                """ encrypt init """
                # Create the KEK used for encryption.
                # KeyWrapper is the provided sample implementation, but the user may use their own object as long as it implements the interface above.
                kek = KeyWrapper(self._key_identifier, self._secret_key) #  Key identifier

                # Create the key resolver used for decryption.
                # KeyResolver is the provided sample implementation, but the user may use whatever implementation they choose so long as the function set on the service object behaves appropriately.
                key_resolver = KeyResolver()
                key_resolver.put_key(kek)

                # Create the EncryptionResolver Function to determine Properties to en/decrypt
                encryptionresolver = self.__encryptionresolver__(modeldefinition['encrypt'])


                # Set the require Encryption, KEK and key resolver on the service object.
                modeldefinition['tableservice'].key_encryption_key = kek
                modeldefinition['tableservice'].key_resolver_funcion = key_resolver.resolve_key
                modeldefinition['tableservice'].encryption_resolver_function = encryptionresolver
                pass

            self.__createtable__(modeldefinition)
                
            self._modeldefinitions.append(modeldefinition)

            log.info('model {} registered successfully. Models are {!s}.'.format(modeldefinition['modelname'], [model['modelname'] for model in self._modeldefinitions]))
        else:
            log.info('model {} already registered. Models are {!s}.'.format(modeldefinition['modelname'], [model['modelname'] for model in self._modeldefinitions]))
1210755
private function initializeBackEnd()
    {
        $backEndUser =
            \Tx_Oelib_BackEndLoginManager::getInstance()->getLoggedInUser(\Tx_Oelib_Mapper_BackEndUser::class);
        $this->languageKey = $backEndUser->getLanguage();
    }
1130416
public static void register(CollectorRegistry registry) {
    new StandardExports().register(registry);
    new MemoryPoolsExports().register(registry);
    new MemoryAllocationExports().register(registry);
    new BufferPoolsExports().register(registry);
    new GarbageCollectorExports().register(registry);
    new ThreadExports().register(registry);
    new ClassLoadingExports().register(registry);
    new VersionInfoExports().register(registry);
  }
959969
def register_backends(vars):
    
    new_backends = {x.replace('Backend', ''): cls
                    for x, cls in vars.items()
                    if inspect.isclass(cls) and issubclass(cls, Backend)}
    available_backends.update(new_backends)