Sets the generated import/export manager.<p>

@param manager the import/export manager to set
320831
public void setImportExportManager(CmsImportExportManager manager) {

        m_importExportManager = manager;
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_IMPORT_MANAGER_0));
        }
    }
1064080
protected DestroyableManager configureManager(final DestroyableManager manager) {
        bind(DestroyableManager.class).toInstance(manager);
        // if logic will not call destroy at least it will be called before jvm shutdown
        Runtime.getRuntime().addShutdownHook(new Thread(manager));
        return manager;
    }
706917
def _configure_manager(self):
        
        self._manager = ImageManager(self, resource_class=Image,
                response_key="", plural_response_key="images",
                uri_base="images")
        self._tasks_manager = ImageTasksManager(self, resource_class=ImageTask,
                response_key="", plural_response_key="tasks",
                uri_base="tasks")
        self._schema_manager = JSONSchemaManager(self, resource_class=None,
                response_key="", plural_response_key="", uri_base="schemas")
507079
@Override
  public void notifyManager() {
    logger.debug(String.format("Notifying Manager for %s", this.getClass().getName()));
    try {
      this.metricManager.reportMetric(this);
    } catch (final Throwable ex) {
      logger.error(
          String.format("Metric Manager is not set for %s metric", this.getClass().getName()), ex);
    }
  }
492156
public function load(ObjectManager $manager)
    {
        $loader = new Loader();
        $loader->addFile(__DIR__.'/../../Resources/config/data/Metas.yml');
        $loader->load($manager, null, $this);
    }
979712
def add_to_manager(self, manager):
        
        # Derive version spec allowing us to filter against major/minor buckets
        spec = self.spec or self.default_spec(manager)
        # Only look in appropriate major version/family; if self is an issue
        # declared as living in e.g. >=2, this means we don't even bother
        # looking in the 1.x family.
        families = [Version(str(x)) for x in manager]
        versions = list(spec.filter(families))
        for version in versions:
            family = version.major
            # Within each family, we further limit which bugfix lines match up
            # to what self cares about (ignoring 'unreleased' until later)
            candidates = [
                Version(x)
                for x in manager[family]
                if not x.startswith('unreleased')
            ]
            # Select matching release lines (& stringify)
            buckets = []
            bugfix_buckets = [str(x) for x in spec.filter(candidates)]
            # Add back in unreleased_* as appropriate
            # TODO: probably leverage Issue subclasses for this eventually?
            if self.is_buglike:
                buckets.extend(bugfix_buckets)
                # Don't put into JUST unreleased_bugfix; it implies that this
                # major release/family hasn't actually seen any releases yet
                # and only exists for features to go into.
                if bugfix_buckets:
                    buckets.append('unreleased_bugfix')
            # Obtain list of minor releases to check for "haven't had ANY
            # releases yet" corner case, in which case ALL issues get thrown in
            # unreleased_feature for the first release to consume.
            # NOTE: assumes first release is a minor or major one,
            # but...really? why would your first release be a bugfix one??
            no_releases = not self.minor_releases(manager)
            if self.is_featurelike or self.backported or no_releases:
                buckets.append('unreleased_feature')
            # Now that we know which buckets are appropriate, add ourself to
            # all of them. TODO: or just...do it above...instead...
            for bucket in buckets:
                manager[family][bucket].append(self)
387953
public void setManagerGroup(String managerGroup) {

        CmsGroup group = checkGroup(managerGroup);
        if (group != null) {
            m_project.setManagerGroupId(group.getId());
        }
    }
788408
public function addToManager(Manager $manager)
    {
        $this->registerFixedTypes($manager);
        $this->registerPeripheralTypes($manager);

        $this->extend('onBeforeAddToManager', $manager);

        // Add all DataObjects to the manager
        foreach ($this->types as $scaffold) {
            $scaffold->addToManager($manager);
            $inheritanceScaffolder = new InheritanceScaffolder(
                $scaffold->getDataObjectClass(),
                StaticSchema::config()->get('inheritanceTypeSuffix')
            );
            // Due to shared ancestry, it's inevitable that the same union type will get added multiple times.
            if (!$manager->hasType($inheritanceScaffolder->getName())) {
                $inheritanceScaffolder->addToManager($manager);
            }
        }

        foreach ($this->queries as $scaffold) {
            $scaffold->addToManager($manager);
        }

        foreach ($this->mutations as $scaffold) {
            $scaffold->addToManager($manager);
        }

        $this->extend('onAfterAddToManager', $manager);
    }
566966
private static void current(ClassLoader loader, InjectorImpl manager)
  {
    Objects.requireNonNull(manager);

    synchronized (loader) {
      if (loader instanceof DynamicClassLoader) {
        _localManager.set(manager, loader);
      }
      else {
        _loaderManagerMap.put(loader, new SoftReference<>(manager));
      }
    }
  }
592774
public void setImports(String[] imports) {
        module.bind(CodegenModule.IMPORTS, new HashSet<String>(Arrays.asList(imports)));
    }
599765
public void setSecurityManager(CmsSecurityManager securityManager) {

        if (m_frozen) {
            throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0));
        }
        m_securityManager = securityManager;
    }
86119
def manager(self, value):
        ""
        pid = current_process().ident
        if _managers is None:
            raise RuntimeError("Can not set the manager following a system exit.")
        if pid not in _managers:
            _managers[pid] = value
        else:
            raise Exception("Manager already set for pid %s" % pid)
846993
def add_manager(model):
    
    if model._meta.abstract:
        return
    # Make all managers local for this model to fix patching parent model managers
    model._meta.local_managers = model._meta.managers

    for current_manager in model._meta.local_managers:
        prev_class = current_manager.__class__
        patch_manager_class(current_manager)
        if model._default_manager.__class__ is prev_class:
            # Normally model._default_manager is a reference to one of model's managers
            # (and would be patched by the way).
            # However, in some rare situations (mostly proxy models)
            # model._default_manager is not the same instance as one of managers, but it
            # share the same class.
            model._default_manager.__class__ = current_manager.__class__
    patch_manager_class(model._base_manager)
    model._meta.base_manager_name = 'objects'
    model._meta._expire_cache()
240954
public void initialize(ComponentManager manager, ClassLoader classLoader)
    {
        try {
            // Find all declared components by retrieving the list defined in COMPONENT_LIST.
            List<ComponentDeclaration> componentDeclarations = getDeclaredComponents(classLoader, COMPONENT_LIST);

            // Find all the Component overrides and adds them to the bottom of the list as component declarations with
            // the highest priority of 0. This is purely for backward compatibility since the override files is now
            // deprecated.
            List<ComponentDeclaration> componentOverrideDeclarations =
                getDeclaredComponents(classLoader, COMPONENT_OVERRIDE_LIST);
            for (ComponentDeclaration componentOverrideDeclaration : componentOverrideDeclarations) {
                // Since the old way to declare an override was to define it in both a component.txt and a
                // component-overrides.txt file we first need to remove the override component declaration stored in
                // componentDeclarations.
                componentDeclarations.remove(componentOverrideDeclaration);
                // Add it to the end of the list with the highest priority.
                componentDeclarations.add(new ComponentDeclaration(componentOverrideDeclaration
                    .getImplementationClassName(), 0));
            }

            initialize(manager, classLoader, componentDeclarations);
        } catch (Exception e) {
            // Make sure we make the calling code fail in order to fail fast and prevent the application to start
            // if something is amiss.
            throw new RuntimeException("Failed to get the list of components to load", e);
        }
    }
447399
public synchronized void setSource(Source source) {
        String sourceId = CollectorManagerUtils.getSourceId(source);
        SourceManager srcMgr = null;
        if (!sourceMgrs.containsKey(sourceId)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Adding source to the list", source.getClass());
            }
            srcMgr = new SourceManager(source);
            sourceMgrs.put(srcMgr.getSourceId(), srcMgr);
            /*
             * Obtain the conduit/bufferManager and put it in bufferManagerMap
             * if the source being set is message/log or trace.
             *
             * This is to make up for the prior logic where conduit/bufferManager
             * were created before the source was created and were set into the bufferManagerMap
             *
             * With the new logic concerning LogSource and TraceSource for JsonLogging, the LogSource
             * and TraceSource and their respective Conduit/BufferManager were created outside of
             * CollectorManager and OSGI serviceability. Thus, the following call to processInitializedConduits
             * retrieves the conduits/bufferManagers that were created 'outside' collectorManager's realm of
             * control and places them into bufferManagerMap because the following logic expects the prior
             * statement to be true.
             *
             * Alas, continue 'as normal' afterwards.
             */
            processInitializedConduits(source);

            //Passes BufferManager onto SourceManager which will then associate a Handler to it.
            srcMgr.setBufferManager(bufferManagerMap.get(sourceId));
            //Handle pending subscriptions for this source
            for (Entry<String, HandlerManager> entry : handlerMgrs.entrySet()) {
                HandlerManager hdlrMgr = entry.getValue();
                //Check if source is in the pending subscription list for this handler
                if (hdlrMgr.getPendingSubscriptions().contains(sourceId)) {
                    List<String> sourceIds = new ArrayList<String>();
                    sourceIds.add(sourceId);
                    try {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Handling pending subscription " + sourceId,
                                     hdlrMgr.getHandlerId());
                        }
                        subscribe(hdlrMgr.getHandler(), sourceIds);
                    } catch (Exception e) {

                    }
                }
            }
        }
    }
637451
private static void setExportInfo(Catalog catalog, ExportType exportType) {
        final Cluster cluster = catalog.getClusters().get("cluster");
        Database db = cluster.getDatabases().get("database");
        if (DrRoleType.XDCR.value().equals(cluster.getDrrole())) {
            // add default export configuration to DR conflict table
            exportType = addExportConfigToDRConflictsTable(exportType);
        }

        if (exportType == null) {
            return;
        }
        List<String> targetList = new ArrayList<>();

        for (ExportConfigurationType exportConfiguration : exportType.getConfiguration()) {

            boolean connectorEnabled = exportConfiguration.isEnabled();
            String targetName = exportConfiguration.getTarget();
            if (connectorEnabled) {
                m_exportEnabled = true;
                if (targetList.contains(targetName)) {
                    throw new RuntimeException("Multiple connectors can not be assigned to single export target: " +
                            targetName + ".");
                }
                else {
                    targetList.add(targetName);
                }
            }

            Properties processorProperties = checkExportProcessorConfiguration(exportConfiguration);
            org.voltdb.catalog.Connector catconn = db.getConnectors().get(targetName);
            if (catconn == null) {
                if (connectorEnabled) {
                    hostLog.info("Export configuration enabled and provided for export target " + targetName
                            + " in deployment file however no export tables are assigned to the this target. "
                            + "Export target " + targetName + " will be disabled.");
                }
                continue;
            }

            // checking rowLengthLimit
            int rowLengthLimit = Integer.parseInt(processorProperties.getProperty(ROW_LENGTH_LIMIT,"0"));
            if (rowLengthLimit > 0) {
                for (ConnectorTableInfo catTableinfo : catconn.getTableinfo()) {
                    Table tableref = catTableinfo.getTable();
                    int rowLength = Boolean.parseBoolean(processorProperties.getProperty("skipinternals", "false")) ? 0 : EXPORT_INTERNAL_FIELD_Length;
                    for (Column catColumn: tableref.getColumns()) {
                        rowLength += catColumn.getSize();
                    }
                    if (rowLength > rowLengthLimit) {
                        hostLog.error("Export configuration for export target " + targetName + " has" +
                                "configured to has row length limit " + rowLengthLimit +
                                ". But the export table " + tableref.getTypeName() +
                                " has estimated row length " + rowLength +
                                ".");
                        throw new RuntimeException("Export table " + tableref.getTypeName() + " row length is " + rowLength +
                                ", exceeding configurated limitation " + rowLengthLimit + ".");
                    }
                }
            }


            for (String name: processorProperties.stringPropertyNames()) {
                ConnectorProperty prop = catconn.getConfig().get(name);
                if (prop == null) {
                    prop = catconn.getConfig().add(name);
                }
                prop.setName(name);
                prop.setValue(processorProperties.getProperty(name));
            }

            // on-server export always uses the guest processor
            catconn.setLoaderclass(ExportManager.PROCESSOR_CLASS);
            catconn.setEnabled(connectorEnabled);

            if (!connectorEnabled) {
                hostLog.info("Export configuration for export target " + targetName + " is present and is " +
                             "configured to be disabled. Export target " + targetName + " will be disabled.");
            } else {
                hostLog.info("Export target " + targetName + " is configured and enabled with type=" + exportConfiguration.getType());
                if (exportConfiguration.getProperty() != null) {
                    hostLog.info("Export target " + targetName + " configuration properties are: ");
                    for (PropertyType configProp : exportConfiguration.getProperty()) {
                        if (!configProp.getName().toLowerCase().contains("password")) {
                            hostLog.info("Export Configuration Property NAME=" + configProp.getName() + " VALUE=" + configProp.getValue());
                        }
                    }
                }
            }
        }
    }
526789
public void setDefaultWorkManager(WorkManager wm)
   {
      if (trace)
         log.tracef("Default WorkManager: %s", wm);

      String currentName = null;

      if (defaultWorkManager != null)
         currentName = defaultWorkManager.getName();

      defaultWorkManager = wm;

      if (wm != null)
      {
         workmanagers.put(wm.getName(), wm);
      }
      else if (currentName != null)
      {
         workmanagers.remove(currentName);
      }
   }