Interface ExperimentFeatures
- All Known Implementing Classes:
ConfigExperimentFeatures
public interface ExperimentFeatures
Features that can be enabled/disabled on Gerrit (e. g. experiments to research new behavior in
the current release).
It may depend on the implementation if the result is decided on the per-request basis or not,
so the outcomes should not be persisted in Singleton
.
-
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) SameisFeatureEnabled(java.lang.String)
, but takes into accountproject
, when evaluating the experiment.
-
Method Details
-
isFeatureEnabled
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
getEnabledExperimentFeatures()
.- Parameters:
featureFlag
- the name of the feature to test.- Returns:
- if the feature is enabled.
-
isFeatureEnabled
SameisFeatureEnabled(java.lang.String)
, but takes into accountproject
, when evaluating the experiment. -
getEnabledExperimentFeatures
com.google.common.collect.ImmutableSet<String> getEnabledExperimentFeatures()Returns the names of the features that are enabled on Gerrit instance (either by default or via gerrit.config).
-