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