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).boolean
isFeatureEnabled
(String featureFlag) Given the name of the feature, returns if it is enabled on the Gerrit server.boolean
isFeatureEnabled
(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:ExperimentFeatures
Given 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:
isFeatureEnabled
in interfaceExperimentFeatures
- Parameters:
featureFlag
- the name of the feature to test.- Returns:
- if the feature is enabled.
-
isFeatureEnabled
Description copied from interface:ExperimentFeatures
SameExperimentFeatures.isFeatureEnabled(java.lang.String)
, but takes into accountproject
, when evaluating the experiment.- Specified by:
isFeatureEnabled
in interfaceExperimentFeatures
-
getEnabledExperimentFeatures
Description copied from interface:ExperimentFeatures
Returns the names of the features that are enabled on Gerrit instance (either by default or via gerrit.config).- Specified by:
getEnabledExperimentFeatures
in interfaceExperimentFeatures
-