Package io.getunleash
Class DefaultUnleash
java.lang.Object
io.getunleash.DefaultUnleash
- All Implemented Interfaces:
Unleash
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultUnleash(UnleashConfig unleashConfig, IFeatureRepository featureRepository, Strategy... strategies) DefaultUnleash(UnleashConfig unleashConfig, IFeatureRepository featureRepository, Map<String, Strategy> strategyMap, UnleashContextProvider contextProvider, EventDispatcher eventDispatcher, UnleashMetricService metricService) DefaultUnleash(UnleashConfig unleashConfig, IFeatureRepository featureRepository, Map<String, Strategy> strategyMap, UnleashContextProvider contextProvider, EventDispatcher eventDispatcher, UnleashMetricService metricService, boolean failOnMultipleInstantiations) DefaultUnleash(UnleashConfig unleashConfig, Strategy... strategies) -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.deprecatedGetVariant(String toggleName) Deprecated.deprecatedGetVariant(String toggleName, UnleashContext context) Deprecated.deprecatedGetVariant(String toggleName, UnleashContext context, Variant defaultValue) Deprecated.deprecatedGetVariant(String toggleName, Variant defaultValue) Deprecated.getFeatureToggleDefinition(String toggleName) Deprecated.Deprecated.getVariant(String toggleName) getVariant(String toggleName, UnleashContext context) getVariant(String toggleName, UnleashContext context, Variant defaultValue) getVariant(String toggleName, Variant defaultValue) booleanbooleanisEnabled(String toggleName, UnleashContext context, BiPredicate<String, UnleashContext> fallbackAction) booleanisEnabled(String toggleName, UnleashContext context, BiPredicate<String, UnleashContext> fallbackAction, boolean isParent) booleanisEnabled(String toggleName, BiPredicate<String, UnleashContext> fallbackAction) more()voidshutdown()
-
Field Details
-
UNKNOWN_STRATEGY
-
-
Constructor Details
-
DefaultUnleash
-
DefaultUnleash
public DefaultUnleash(UnleashConfig unleashConfig, IFeatureRepository featureRepository, Strategy... strategies) -
DefaultUnleash
public DefaultUnleash(UnleashConfig unleashConfig, IFeatureRepository featureRepository, Map<String, Strategy> strategyMap, UnleashContextProvider contextProvider, EventDispatcher eventDispatcher, UnleashMetricService metricService) -
DefaultUnleash
public DefaultUnleash(UnleashConfig unleashConfig, IFeatureRepository featureRepository, Map<String, Strategy> strategyMap, UnleashContextProvider contextProvider, EventDispatcher eventDispatcher, UnleashMetricService metricService, boolean failOnMultipleInstantiations)
-
-
Method Details
-
isEnabled
-
isEnabled
-
isEnabled
public boolean isEnabled(String toggleName, UnleashContext context, BiPredicate<String, UnleashContext> fallbackAction) -
isEnabled
public boolean isEnabled(String toggleName, UnleashContext context, BiPredicate<String, UnleashContext> fallbackAction, boolean isParent) -
getVariant
- Specified by:
getVariantin interfaceUnleash
-
getVariant
- Specified by:
getVariantin interfaceUnleash
-
getVariant
- Specified by:
getVariantin interfaceUnleash
-
getVariant
- Specified by:
getVariantin interfaceUnleash
-
deprecatedGetVariant
Deprecated.Uses the old, statistically broken Variant seed for finding the correct variant- Specified by:
deprecatedGetVariantin interfaceUnleash- Parameters:
toggleName-context-- Returns:
-
deprecatedGetVariant
public Variant deprecatedGetVariant(String toggleName, UnleashContext context, Variant defaultValue) Deprecated.Uses the old, statistically broken Variant seed for finding the correct variant- Specified by:
deprecatedGetVariantin interfaceUnleash- Parameters:
toggleName-context-defaultValue-- Returns:
-
deprecatedGetVariant
Deprecated.Uses the old, statistically broken Variant seed for finding the correct variant- Specified by:
deprecatedGetVariantin interfaceUnleash- Parameters:
toggleName-- Returns:
-
deprecatedGetVariant
Deprecated.Uses the old, statistically broken Variant seed for finding the correct variant- Specified by:
deprecatedGetVariantin interfaceUnleash- Parameters:
toggleName-defaultValue-- Returns:
-
getFeatureToggleDefinition
Deprecated.Use more().getFeatureToggleDefinition() instead- Returns:
- the feature toggle
-
getFeatureToggleNames
Deprecated.Use more().getFeatureToggleNames() instead- Specified by:
getFeatureToggleNamesin interfaceUnleash- Returns:
- a list of known toggle names
-
count
Deprecated.Use more().count() instead -
shutdown
public void shutdown() -
more
-