Class Allocation
java.lang.Object
com.azure.spring.cloud.feature.management.models.Allocation
Allocation of a feature flag to variants.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the variant to use when the feature flag is disabled and no specific allocation matches.Gets the variant to use when the feature flag is enabled and no specific allocation matches.getGroup()Gets the list of group-specific allocations for the feature flag.Gets the list of percentile-based allocations for the feature flag.getSeed()Gets the seed value used for randomization in allocation calculations.getUser()Gets the list of user-specific allocations for the feature flag.setDefaultWhenDisabled(String defaultWhenDisabled) Sets the variant to use when the feature flag is disabled and no specific allocation matches.setDefaultWhenEnabled(String defaultWhenEnabled) Sets the variant to use when the feature flag is enabled and no specific allocation matches.setGroup(List<GroupAllocation> group) Sets the list of group-specific allocations for the feature flag.setPercentile(List<PercentileAllocation> percentile) Sets the list of percentile-based allocations for the feature flag.Sets the seed value used for randomization in allocation calculations.setUser(List<UserAllocation> user) Sets the list of user-specific allocations for the feature flag.
-
Constructor Details
-
Allocation
public Allocation()Creates a new instance of the Allocation class.
-
-
Method Details
-
getDefaultWhenEnabled
Gets the variant to use when the feature flag is enabled and no specific allocation matches.- Returns:
- the default variant when the feature flag is enabled
-
setDefaultWhenEnabled
Sets the variant to use when the feature flag is enabled and no specific allocation matches.- Parameters:
defaultWhenEnabled- the default variant when enabled- Returns:
- the updated Allocation object
-
getDefaultWhenDisabled
Gets the variant to use when the feature flag is disabled and no specific allocation matches.- Returns:
- the default variant when the feature flag is disabled
-
setDefaultWhenDisabled
Sets the variant to use when the feature flag is disabled and no specific allocation matches.- Parameters:
defaultWhenDisabled- the default variant when disabled- Returns:
- the updated Allocation object
-
getUser
Gets the list of user-specific allocations for the feature flag.- Returns:
- the list of user allocations
-
setUser
Sets the list of user-specific allocations for the feature flag.- Parameters:
user- the list of user allocations- Returns:
- the updated Allocation object
-
getGroup
Gets the list of group-specific allocations for the feature flag.- Returns:
- the list of group allocations
-
setGroup
Sets the list of group-specific allocations for the feature flag.- Parameters:
group- the list of group allocations- Returns:
- the updated Allocation object
-
getPercentile
Gets the list of percentile-based allocations for the feature flag.- Returns:
- the list of percentile allocations
-
setPercentile
Sets the list of percentile-based allocations for the feature flag.- Parameters:
percentile- the list of percentile allocations- Returns:
- the updated Allocation object
-
getSeed
Gets the seed value used for randomization in allocation calculations.- Returns:
- the seed value for allocation
-
setSeed
Sets the seed value used for randomization in allocation calculations.- Parameters:
seed- the seed value for allocation- Returns:
- the updated Allocation object
-