@Deprecated public class TestFeatureStore extends InMemoryFeatureStore
InMemoryFeatureStore
which provides functionality to create (or override) true or false feature flags for all users.
Using this store is useful for testing purposes when you want to have runtime support for turning specific features on or off.
Constructor and Description |
---|
TestFeatureStore()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
init(java.util.Map<VersionedDataKind<?>,java.util.Map<java.lang.String,? extends VersionedData>> allData)
Deprecated.
Initializes (or re-initializes) the store with the specified set of objects.
|
boolean |
initialized()
Deprecated.
Returns true if this store has been initialized.
|
com.launchdarkly.client.FeatureFlag |
setBooleanValue(java.lang.String key,
java.lang.Boolean value)
Deprecated.
Sets the value of a boolean feature flag for all users.
|
com.launchdarkly.client.FeatureFlag |
setDoubleValue(java.lang.String key,
java.lang.Double value)
Deprecated.
Sets the value of a double multivariate feature flag, for all users.
|
com.launchdarkly.client.FeatureFlag |
setFeatureFalse(java.lang.String key)
Deprecated.
Turns a feature, identified by key, to evaluate to false for every user.
|
com.launchdarkly.client.FeatureFlag |
setFeatureTrue(java.lang.String key)
Deprecated.
Turns a feature, identified by key, to evaluate to true for every user.
|
void |
setInitialized(boolean value)
Deprecated.
Sets the initialization status that the feature store will report to the SDK
|
com.launchdarkly.client.FeatureFlag |
setIntegerValue(java.lang.String key,
java.lang.Integer value)
Deprecated.
Sets the value of an integer multivariate feature flag, for all users.
|
com.launchdarkly.client.FeatureFlag |
setJsonValue(java.lang.String key,
com.google.gson.JsonElement value)
Deprecated.
Sets the value of a JsonElement multivariate feature flag, for all users.
|
com.launchdarkly.client.FeatureFlag |
setStringValue(java.lang.String key,
java.lang.String value)
Deprecated.
Sets the value of a string multivariate feature flag, for all users.
|
all, close, delete, describeConfiguration, get, upsert
public com.launchdarkly.client.FeatureFlag setBooleanValue(java.lang.String key, java.lang.Boolean value)
key
- the key of the feature flagvalue
- the new value of the feature flagpublic com.launchdarkly.client.FeatureFlag setFeatureTrue(java.lang.String key)
LDUser
.
If the feature rule is not currently in the store, it will create one that is true for every LDUser
.key
- the key of the feature flag to evaluate to truepublic com.launchdarkly.client.FeatureFlag setFeatureFalse(java.lang.String key)
LDUser
.
If the feature rule is not currently in the store, it will create one that is false for every LDUser
.key
- the key of the feature flag to evaluate to falsepublic com.launchdarkly.client.FeatureFlag setIntegerValue(java.lang.String key, java.lang.Integer value)
key
- the key of the flagvalue
- the new value of the flagpublic com.launchdarkly.client.FeatureFlag setDoubleValue(java.lang.String key, java.lang.Double value)
key
- the key of the flagvalue
- the new value of the flagpublic com.launchdarkly.client.FeatureFlag setStringValue(java.lang.String key, java.lang.String value)
key
- the key of the flagvalue
- the new value of the flagpublic com.launchdarkly.client.FeatureFlag setJsonValue(java.lang.String key, com.google.gson.JsonElement value)
key
- the key of the flagvalue
- the new value of the flagpublic void init(java.util.Map<VersionedDataKind<?>,java.util.Map<java.lang.String,? extends VersionedData>> allData)
FeatureStore
If possible, the store should update the entire data set atomically. If that is not possible, it should iterate through the outer map and then the inner map in the order provided (the SDK will use a Map subclass that has a defined ordering), storing each item, and then delete any leftover items at the very end.
The store should not attempt to modify any of the Maps, and if it needs to retain the data in memory it should copy the Maps.
init
in interface FeatureStore
init
in class InMemoryFeatureStore
allData
- all objects to be storedpublic boolean initialized()
FeatureStore
initialized
in interface FeatureStore
initialized
in class InMemoryFeatureStore
public void setInitialized(boolean value)
value
- true if the store should show as initialized