Udostępnij przez


FeatureManagerSnapshot Class

  • java.lang.Object
    • com.azure.spring.cloud.feature.management.web.FeatureManagerSnapshot

public class FeatureManagerSnapshot

Holds information on Feature Management properties and can check if a given feature is enabled. Returns the same value in the same request.

Method Summary

Modifier and Type Method and Description
Variant getVariant(String feature)

Returns the variant assigned to the current context.

Variant getVariant(String feature, Object featureContext)

Returns the variant assigned to the current context.

Mono<Variant> getVariantAsync(String feature)

Returns the variant assigned to the current context.

Mono<Variant> getVariantAsync(String feature, Object featureContext)

Returns the variant assigned to the current context.

Boolean isEnabled(String feature)

Checks to see if the feature is enabled.

Boolean isEnabled(String feature, Object featureContext)

Checks to see if the feature is enabled.

Mono<Boolean> isEnabledAsync(String feature)

Checks to see if the feature is enabled.

Mono<Boolean> isEnabledAsync(String feature, Object featureContext)

Checks to see if the feature is enabled.

Methods inherited from java.lang.Object

Method Details

getVariant

public Variant getVariant(String feature)

Returns the variant assigned to the current context.

If getVariant has already been called on this feature in this request, it will return the same value as it did before.

Parameters:

feature - Feature being checked.

Returns:

state of the feature

getVariant

public Variant getVariant(String feature, Object featureContext)

Returns the variant assigned to the current context.

If getVariant has already been called on this feature in this request, it will return the same value as it did before.

Parameters:

feature - Feature being checked.
featureContext - Local context

Returns:

state of the feature

getVariantAsync

public Mono<Variant> getVariantAsync(String feature)

Returns the variant assigned to the current context.

If getVariantAsync has already been called on this feature in this request, it will return the same value as it did before.

Parameters:

feature - Feature being checked.

Returns:

state of the feature

getVariantAsync

public Mono<Variant> getVariantAsync(String feature, Object featureContext)

Returns the variant assigned to the current context.

If getVariantAsync has already been called on this feature in this request, it will return the same value as it did before.

Parameters:

feature - Feature being checked.
featureContext - Local context

Returns:

state of the feature

isEnabled

public Boolean isEnabled(String feature)

Checks to see if the feature is enabled. If enabled it checks each filter, once a single filter returns true it returns true. If no filter returns true, it returns false. If there are no filters, it returns true. If feature isn't found it returns false.

If isEnabled has already been called on this feature in this request, it will return the same value as it did before.

Parameters:

feature - Feature being checked.

Returns:

state of the feature

isEnabled

public Boolean isEnabled(String feature, Object featureContext)

Checks to see if the feature is enabled. If enabled it checks each filter, once a single filter returns true it returns true. If no filter returns true, it returns false. If there are no filters, it returns true. If feature isn't found it returns false.

If isEnabled has already been called on this feature in this request, it will return the same value as it did before.

Parameters:

feature - Feature being checked.
featureContext - Local context

Returns:

state of the feature

isEnabledAsync

public Mono<Boolean> isEnabledAsync(String feature)

Checks to see if the feature is enabled. If enabled it checks each filter, once a single filter returns true it returns true. If no filter returns true, it returns false. If there are no filters, it returns true. If feature isn't found it returns false.

If isEnabled has already been called on this feature in this request, it will return the same value as it did before.

Parameters:

feature - Feature being checked.

Returns:

state of the feature

isEnabledAsync

public Mono<Boolean> isEnabledAsync(String feature, Object featureContext)

Checks to see if the feature is enabled. If enabled it checks each filter, once a single filter returns true it returns true. If no filter returns true, it returns false. If there are no filters, it returns true. If feature isn't found it returns false.

If isEnabled has already been called on this feature in this request, it will return the same value as it did before.

Parameters:

feature - Feature being checked.
featureContext - Local context

Returns:

state of the feature

Applies to