Udostępnij przez


Allocation Class

  • java.lang.Object
    • com.azure.spring.cloud.feature.management.models.Allocation

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<GroupAllocation> getGroup()

Gets the list of group-specific allocations for the feature flag.

List<PercentileAllocation> 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<UserAllocation> 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:

the default variant when the feature flag is disabled

getDefaultWhenEnabled

public String 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

getGroup

public List<GroupAllocation> getGroup()

Gets the list of group-specific allocations for the feature flag.

Returns:

the list of group allocations

getPercentile

public List<PercentileAllocation> getPercentile()

Gets the list of percentile-based allocations for the feature flag.

Returns:

the list of percentile allocations

getSeed

public String getSeed()

Gets the seed value used for randomization in allocation calculations.

Returns:

the seed value for allocation

getUser

public List<UserAllocation> getUser()

Gets the list of user-specific allocations for the feature flag.

Returns:

the list of user allocations

setDefaultWhenDisabled

public Allocation setDefaultWhenDisabled(String defaultWhenDisabled)

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

setDefaultWhenEnabled

public Allocation setDefaultWhenEnabled(String defaultWhenEnabled)

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

setGroup

public Allocation setGroup(List<GroupAllocation> group)

Sets the list of group-specific allocations for the feature flag.

Parameters:

group - the list of group allocations

Returns:

the updated Allocation object

setPercentile

public Allocation setPercentile(List<PercentileAllocation> percentile)

Sets the list of percentile-based allocations for the feature flag.

Parameters:

percentile - the list of percentile allocations

Returns:

the updated Allocation object

setSeed

public Allocation setSeed(String seed)

Sets the seed value used for randomization in allocation calculations.

Parameters:

seed - the seed value for allocation

Returns:

the updated Allocation object

setUser

public Allocation setUser(List<UserAllocation> user)

Sets the list of user-specific allocations for the feature flag.

Parameters:

user - the list of user allocations

Returns:

the updated Allocation object

Applies to