Register a list of features to all clients marked with the given group.
346167
public synchronized JaxRsClientFactory addFeatureToGroup(JaxRsFeatureGroup group, Feature... features) {
        Preconditions.checkState(!started, "Already started building clients");
        featureMap.putAll(group, Arrays.asList(features));
        LOG.trace("Group {} registers features {}", group, features);
        return this;
    }
238831
public synchronized ClientBuilder newBuilder(String clientName, JaxRsClientConfig jaxRsConfig, Collection<JaxRsFeatureGroup> featureGroupsIn) {
        started = true;

        final List<JaxRsFeatureGroup> featureGroups = ImmutableList.<JaxRsFeatureGroup>builder()
                .add(PrivateFeatureGroup.WILDCARD)
                .addAll(featureGroupsIn)
                .build();

        final ClientBuilder builder = factory(ctx).newBuilder(clientName, jaxRsConfig, featureGroups);

        builder.property(CLIENT_NAME_PROPERTY, clientName);
        builder.property(FEATURE_GROUP_PROPERTY, featureGroups);

        final List<Feature> features = featureGroups.stream()
            .flatMap(g -> featureMap.get(g).stream())
            .collect(Collectors.toList());

        final List<Class<? extends Feature>> classFeatures = featureGroups.stream()
            .flatMap(g -> classFeatureMap.get(g).stream())
            .collect(Collectors.toList());

        LOG.debug("Building client '{}' with feature groups {}, features {} {}, and config '{}'", clientName, featureGroups, features, classFeatures, jaxRsConfig);
        features.forEach(builder::register);
        classFeatures.forEach(builder::register);

        return builder;
    }
794679
protected function registerGroupProvider()
	{
		$this->app->singleton('sentry.group', function($app)
		{
			$config = $app['config']->get('cartalyst.sentry');

			$model = array_get($config, 'groups.model');

			// Define the User model to use for relationships.
			if (method_exists($model, 'setUserModel'))
			{
				$userModel = array_get($config, 'users.model');

				forward_static_call_array(
					array($model, 'setUserModel'),
					array($userModel)
				);
			}

			// Define the user group pivot table name to use for relationships.
			if (method_exists($model, 'setUserGroupsPivot'))
			{
				$pivotTable = array_get($config, 'user_groups_pivot_table');

				forward_static_call_array(
					array($model, 'setUserGroupsPivot'),
					array($pivotTable)
				);
			}

			return new GroupProvider($model);
		});
	}
1369326
static void register(String group, long durationMillis) {
        for (ProfilingListener listener : LISTENERS) {
            listener.register(group, durationMillis);
        }
    }
541135
def register_device(self, dev_name):
        """"""
        if dev_name not in self.devices:
            self.devices.append(dev_name)
        group_name = self.system.__dict__[dev_name]._group
        if group_name not in self.group.keys():
            self.group[group_name] = {}
1186275
public synchronized JaxRsClientFactory addFeatureMap(Map<JaxRsFeatureGroup, Set<Feature>> map) {
        map.forEach((g, fs) -> fs.forEach(f -> addFeatureToGroup(g, f)));
        return this;
    }
546596
@SafeVarargs
    public final synchronized JaxRsClientFactory addFeatureToAllClients(Class<? extends Feature>... features) {
        return addFeatureToGroup(PrivateFeatureGroup.WILDCARD, features);
    }
633851
def _mirror_groups_from_stormpath(self):
        """"""
        APPLICATION = get_application()
        sp_groups = [g.name for g in APPLICATION.groups]
        missing_from_db, missing_from_sp = self._get_group_difference(sp_groups)

        if missing_from_db:
            groups_to_create = []

            for g_name in missing_from_db:
                groups_to_create.append(Group(name=g_name))

            Group.objects.bulk_create(groups_to_create)
660863
public void registerAllInnerClasses(ClassVisitor visitor) {
    for (Map.Entry<TypeInfo, Integer> entry : innerClassesAccessModifiers.entrySet()) {
      TypeInfo innerClass = entry.getKey();
      doRegister(visitor, innerClass);
    }
  }
1068158
def load_entry_point_group_mappings(self, entry_point_group_mappings):
        """"""
        for ep in iter_entry_points(group=entry_point_group_mappings):
            self.register_mappings(ep.name, ep.module_name)
1175519
public function registerAll()
    {
        /** @var LanguageService $service */
        $service   = resolve(LanguageService::class);
        $languages = $service->getAllEnabled();
        foreach ($this->routes['ml'] as $value) {
            foreach ($languages as $language) {
                $prefix = null;
                if (!$language->is_default) {
                    $prefix = $language->code;
                }
                Route::group(
                    array_merge(['prefix' => $prefix], $value['groupArgs']),
                    function ($router) use ($value, $language) {
                        $value['closure']($router, $language->code);
                    }
                );
            }
        }
        foreach ($this->routes['regular'] as $value) {
            Route::group(
                $value['groupArgs'],
                function ($router) use ($value) {
                    $value['closure']($router);
                }
            );
        }
        if (!empty($this->routes['catchAll'])) {
            Route::group(
                $this->routes['catchAll']['groupArgs'],
                function ($router) {
                    $this->routes['catchAll']['closure']($router);
                }
            );
        }

        $router = resolve('router');
        $router->getRoutes()->refreshActionLookups();
        $router->getRoutes()->refreshNameLookups();
    }
738756
private function SaveGroups()
    {
        $assignedIDs = $this->AssignedGroupIDs();
        $selectedIDs = Request::PostArray('Group');
        $this->ClearMembergroups($selectedIDs);
        foreach ($selectedIDs as $selectedID)
        {
            if (!in_array($selectedID, $assignedIDs))
            {
                $confirmGroup = new RegisterConfirmMembergroup();
                $confirmGroup->SetConfirm($this->confirm);
                $confirmGroup->SetMemberGroup(Membergroup::Schema()->ByID($selectedID));
                $confirmGroup->Save();
            }
        }
    }
1273142
public static TraceComponent register(Class<?> aClass, String group) {
        return register(aClass, group, null);
    }
968331
def register_entry_points(self):
        
        for entrypoint in entrypoints.get_group_all("papermill.engine"):
            self.register(entrypoint.name, entrypoint.load())
1232257
def add_resourcegroup(group, network_id,**kwargs):
    
    group_i                   = ResourceGroup()
    group_i.name              = group.name
    group_i.description       = group.description
    group_i.status            = group.status
    group_i.network_id        = network_id
    db.DBSession.add(group_i)
    db.DBSession.flush()
    return group_i
146590
def add_multizone(self, group_cast):
        
        self._groups[str(group_cast.uuid)] = {
            'chromecast': group_cast,
            'listener': Listener(group_cast, self._casts),
            'members': set()}
1138881
@Override
	public void register(Metric metric, String metricName, AbstractMetricGroup group) {
		synchronized (lock) {
			if (isShutdown()) {
				LOG.warn("Cannot register metric, because the MetricRegistry has already been shut down.");
			} else {
				if (reporters != null) {
					for (int i = 0; i < reporters.size(); i++) {
						MetricReporter reporter = reporters.get(i);
						try {
							if (reporter != null) {
								FrontMetricGroup front = new FrontMetricGroup<AbstractMetricGroup<?>>(i, group);
								reporter.notifyOfAddedMetric(metric, metricName, front);
							}
						} catch (Exception e) {
							LOG.warn("Error while registering metric.", e);
						}
					}
				}
				try {
					if (queryService != null) {
						queryService.addMetric(metricName, metric, group);
					}
				} catch (Exception e) {
					LOG.warn("Error while registering metric.", e);
				}
				try {
					if (metric instanceof View) {
						if (viewUpdater == null) {
							viewUpdater = new ViewUpdater(executor);
						}
						viewUpdater.notifyOfAddedView((View) metric);
					}
				} catch (Exception e) {
					LOG.warn("Error while registering metric.", e);
				}
			}
		}
	}