Class PercentageFilter
- java.lang.Object
-
- com.azure.spring.cloud.feature.manager.feature.filters.PercentageFilter
-
- All Implemented Interfaces:
FeatureFilter
@Component("PercentageFilter") public class PercentageFilter extends Object implements FeatureFilterA feature filter that can be used to activate a feature based on a random percentage.
-
-
Constructor Summary
Constructors Constructor Description PercentageFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(FeatureFilterEvaluationContext context)Performs a percentage based evaluation to determine whether a feature is enabled.
-
-
-
Method Detail
-
evaluate
public boolean evaluate(FeatureFilterEvaluationContext context)
Performs a percentage based evaluation to determine whether a feature is enabled.- Specified by:
evaluatein interfaceFeatureFilter- Parameters:
context- The feature evaluation context.- Returns:
- True if the feature is enabled, false otherwise.
- Throws:
NumberFormatException- if the percentage filter setting is not a parsable double
-
-