你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

FeatureManager Class

  • java.lang.Object
    • com.azure.spring.cloud.feature.management.FeatureManager

public class FeatureManager

Holds information on Feature Management properties and can check if a given feature is enabled.

Method Summary

Modifier and Type Method and Description
Set<String> getAllFeatureNames()

Returns the names of all features flags

Boolean isEnabled(String feature)

Checks to see if the feature is enabled.

Mono<Boolean> isEnabledAsync(String feature)

Checks to see if the feature is enabled.

Methods inherited from java.lang.Object

Method Details

getAllFeatureNames

public Set getAllFeatureNames()

Returns the names of all features flags

Returns:

a set of all feature names

isEnabled

public Boolean isEnabled(String feature)

Checks to see if the feature is enabled. If enabled it check 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.

Parameters:

feature - Feature being checked.

Returns:

state of the feature

Throws:

FilterNotFoundException - file not found

isEnabledAsync

public Mono isEnabledAsync(String feature)

Checks to see if the feature is enabled. If enabled it check 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.

Parameters:

feature - Feature being checked.

Returns:

state of the feature

Applies to