Creates the Manager instances to handle monitoring.
544192
def _configure_manager(self):
        
        self._flavor_manager = CloudCDNFlavorManager(self,
                uri_base="flavors", resource_class=CloudCDNFlavor,
                response_key=None, plural_response_key="flavors")
        self._services_manager = CloudCDNServiceManager(self,
                uri_base="services", resource_class=CloudCDNService,
                response_key=None, plural_response_key="services")
699530
private void registerCallbacks(Manager manager) {
		if (callbacks != null) {
			for (Callback callback : callbacks) {
				manager.callback().addCallback(callback);
			}
		}
	}
673013
private static OMMapManager createInstance() {
    final OMMapManager localInstance;
    if (OGlobalConfiguration.FILE_MMAP_USE_OLD_MANAGER.getValueAsBoolean()) {
      OLogManager.instance().config(null, "[OMMapManagerLocator.createInstance] Using old mmap manager!");
      localInstance = new OMMapManagerOld();
    } else {
      OLogManager.instance().config(null, "[OMMapManagerLocator.createInstance] Using new mmap manager!");
      localInstance = new OMMapManagerNew();
    }
    return localInstance;
  }
749298
def become_monitor(self, rules) :
        ""
        message = Message.new_method_call \
          (
            destination = DBUS.SERVICE_DBUS,
            path = DBUS.PATH_DBUS,
            iface = DBUS.INTERFACE_MONITORING,
            method = "BecomeMonitor"
          )
        message.append_objects("asu", (list(format_rule(rule) for rule in rules)), 0)
        self.send(message)
1289103
public function postStartupManagers()
    {

        // initialize the registered managers
        /** @var \AppserverIo\Psr\Application\ManagerInterface $manager */
        foreach ($this->getManagers() as $manager) {
            // log the manager we want to invoke the postStartup() lifecycle callback
            \debug(sprintf('Now invoke the postStartup() lifecycle callback of manager %s for application %s', get_class($manager), $this->getName()));

            // invoke the manager's postStartup() lifecycle callback
            $manager->postStartup($this);

            // log the manager we've successfully invoked the postStartup() lifecycle callback
            \debug(sprintf('Successfully invoked the postStartup() lifecycle callback of manager %s for application %s', get_class($manager), $this->getName()));
        }
    }
770379
public static function initialize()
    {
        $manager = self::$manager = new self();
        $manager->seedHandlerStack();

        session_set_save_handler($manager);

        return $manager;
    }
1082443
@Override
	public synchronized void initialize(Manager manager) {
		if (this.manager != null) {
			throw new IllegalStateException("Callback was already initialized");
		}
		this.manager = manager;
		for (Callback callback : callbacks) {
			try {
				callback.initialize(manager);
			} catch (Exception e) {
				onManagerWarning("Callback initialization error", e);
			}
		}
	}
193649
@Override
    public void doSessionCreated(final long sessionId, final ManagementSessionType managementSessionType) throws Exception {
        ThreadGatewayStats stats = gatewayStats.get();
        stats.doSessionCreated();
    }
27330
def create(self):
        

        log.info("{module}: {name} [{id}] created".format(module=self.manager.module_name,
                                                          name=self.name,
                                                          id=self.id))
735895
public void launch(Monitored mp) {
    if (!lifecycle.tryToMoveTo(Lifecycle.State.STARTING)) {
      throw new IllegalStateException("Already started");
    }
    monitored = mp;

    Logger logger = LoggerFactory.getLogger(getClass());
    try {
      launch(logger);
    } catch (Exception e) {
      logger.warn("Fail to start {}", getKey(), e);
    } finally {
      stop();
    }
  }
298364
def create_iam(self):
        """"""
        utils.banner("Creating IAM")
        iam.create_iam_resources(env=self.env, app=self.app)
247136
def set_managers(sender, **kwargs):
    
    cls = sender
   
    if issubclass(cls, ModelBase):
        cls.add_to_class('permitted', PermittedManager())
548838
protected function setUpEntityManagers()
    {
        $managers    = [];
        $connections = [];

        foreach ($this->config['managers'] as $manager => $settings) {
            $managerName    = IlluminateRegistry::getManagerNamePrefix() . $manager;
            $connectionName = IlluminateRegistry::getConnectionNamePrefix() . $manager;

            // Bind manager
            $this->app->singleton($managerName, function () use ($settings) {

                $manager = EntityManager::create(
                    ConnectionManager::resolve(array_get($settings, 'connection')),
                    MetaDataManager::resolve(array_get($settings, 'meta'))
                );

                $configuration = $manager->getConfiguration();

                // Listeners
                if (isset($settings['events']['listeners'])) {
                    foreach ($settings['events']['listeners'] as $event => $listener) {
                        $manager->getEventManager()->addEventListener($event, $listener);
                    }
                }

                // Subscribers
                if (isset($settings['events']['subscribers'])) {
                    foreach ($settings['events']['subscribers'] as $subscriber) {
                        $manager->getEventManager()->addEventSubscriber($subscriber);
                    }
                }

                // Filters
                if (isset($settings['filters'])) {
                    foreach ($settings['filters'] as $name => $filter) {
                        $configuration->getMetadataDriverImpl()->addFilter($name, $filter);
                        $manager->getFilters()->enable($name);
                    }
                }

                // Paths
                $configuration->getMetadataDriverImpl()->addPaths(
                    array_get($settings, 'paths', [])
                );

                // Repository
                $configuration->setDefaultRepositoryClassName(
                    array_get($settings, 'repository', \Doctrine\ORM\EntityRepository::class)
                );

                $configuration->setAutoGenerateProxyClasses(
                    array_get($settings, 'proxies.auto_generate', false)
                );

                if ($namespace = array_get($settings, 'proxies.namespace', false)) {
                    $configuration->setProxyNamespace($namespace);
                }

                return $manager;
            });

            // Bind connection
            $this->app->singleton($connectionName, function ($app) use ($manager) {
                $app->make(IlluminateRegistry::getManagerNamePrefix() . $manager)->getConnection();
            });

            $managers[$manager]    = $manager;
            $connections[$manager] = $manager;
        }

        return [$managers, $connections];
    }
689981
private void createDestinationManager() {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "createDestinationManager");

        _destinationManager = new DestinationManager(this, _persistentStore);

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "createDestinationManager");
    }
882251
def watch_instances(self, flag):
        """"""
        lib.EnvSetDefclassWatchInstances(self._env, int(flag), self._cls)
726827
protected function loadManager()
    {
        if (null === $this->getManager()) {
            $manager = new Manager($this->getConfig(), $this);
            $this->setManager($manager);
        } else {
            $manager = $this->getManager();
            $manager->setCommand($this);
        }
    }
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)