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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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).boolean
isFeatureEnabled(String featureFlag)
Given the name of the feature, returns if it is enabled on the Gerrit server.
-
-
-
Method Detail
-
isFeatureEnabled
boolean isFeatureEnabled(String featureFlag)
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.
-
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).
-
-