Class ConfigExperimentFeatures
java.lang.Object
com.google.gerrit.server.experiments.ConfigExperimentFeatures
- All Implemented Interfaces:
ExperimentFeatures
An implementation of
ExperimentFeatures that uses gerrit.config to evaluate the status of
the feature.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.ImmutableSet<String>Returns the names of the features that are enabled on Gerrit instance (either by default or via gerrit.config).booleanisFeatureEnabled(String featureFlag) Given the name of the feature, returns if it is enabled on the Gerrit server.booleanisFeatureEnabled(String featureFlag, Project.NameKey project) SameExperimentFeatures.isFeatureEnabled(java.lang.String), but takes into accountproject, when evaluating the experiment.
-
Constructor Details
-
ConfigExperimentFeatures
@Inject public ConfigExperimentFeatures(org.eclipse.jgit.lib.Config gerritServerConfig)
-
-
Method Details
-
isFeatureEnabled
Description copied from interface:ExperimentFeaturesGiven the name of the feature, returns if it is enabled on the Gerrit server.Depending on the implementation, it can be more efficient than filtering the results of
ExperimentFeatures.getEnabledExperimentFeatures().- Specified by:
isFeatureEnabledin interfaceExperimentFeatures- Parameters:
featureFlag- the name of the feature to test.- Returns:
- if the feature is enabled.
-
isFeatureEnabled
Description copied from interface:ExperimentFeaturesSameExperimentFeatures.isFeatureEnabled(java.lang.String), but takes into accountproject, when evaluating the experiment.- Specified by:
isFeatureEnabledin interfaceExperimentFeatures
-
getEnabledExperimentFeatures
Description copied from interface:ExperimentFeaturesReturns the names of the features that are enabled on Gerrit instance (either by default or via gerrit.config).- Specified by:
getEnabledExperimentFeaturesin interfaceExperimentFeatures
-