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.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
-
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
-