public class PropertyBasedStateRepository extends Object implements StateRepository
StateRepositorystores the state of features in a
Propertiesformat. The properties are managed through an implementation of
PropertySourceto manage the actual source of the property values.
The file format has changed since version 2.0.0 because of the new extendible activation strategy support. Old file formats will be automatically migrated. The new format looks like this:
FEATURE_ONE = true FEATURE_ONE.strategy = gradual FEATURE_ONE.param.percentage = 25 FEATURE_TWO = false
A feature is enabled if the value is one of
enabled; any other
value and the feature is considered disabled.
|Constructor and Description|
|Modifier and Type||Method and Description|
Get the persisted state of a feature from the repository.
Persist the supplied feature state.
public PropertyBasedStateRepository(PropertySource propertySource)
public FeatureState getFeatureState(Feature feature)
public void setFeatureState(FeatureState featureState)
StateRepository.getFeatureState(Feature)return the same state as persisted using this method.
Copyright © 2016. All Rights Reserved.