public class FileBasedStateRepository extends Object implements StateRepository
This implementation of
StateRepository stores the state of feature using a standard Java properties file.
The file format has changed since version 2.0.0 because of the new extendable 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
Please note that this class is able to detect changes made to the properties file and will automatically reload it in this case.
|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 FileBasedStateRepository(File file)
Filerepresenting the Java properties file to use.
public FeatureState getFeatureState(Feature feature)
public void setFeatureState(FeatureState featureState)
StateRepository.getFeatureState(Feature)return the same state as persisted using this method.
Copyright © 2014. All Rights Reserved.