@Deprecated public class RedisFeatureStore extends java.lang.Object implements FeatureStore
Instead of referencing this class directly, use Redis.dataStore()
to obtain a builder object.
Modifier | Constructor and Description |
---|---|
|
RedisFeatureStore()
Deprecated.
Please use
Components.redisFeatureStore() instead. |
protected |
RedisFeatureStore(RedisFeatureStoreBuilder builder)
Deprecated.
Creates a new store instance that connects to Redis based on the provided
RedisFeatureStoreBuilder . |
Modifier and Type | Method and Description |
---|---|
<T extends VersionedData> |
all(VersionedDataKind<T> kind)
Deprecated.
Returns a
Map of all associated objects of a given kind. |
void |
close()
Deprecated.
|
<T extends VersionedData> |
delete(VersionedDataKind<T> kind,
java.lang.String key,
int version)
Deprecated.
Deletes the object associated with the specified key, if it exists and its version
is less than or equal to the specified version.
|
<T extends VersionedData> |
get(VersionedDataKind<T> kind,
java.lang.String key)
Deprecated.
Returns the object to which the specified key is mapped, or
null if the key is not associated or the associated object has
been deleted.
|
com.google.common.cache.CacheStats |
getCacheStats()
Deprecated.
Return the underlying Guava cache stats object.
|
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.
|
<T extends VersionedData> |
upsert(VersionedDataKind<T> kind,
T item)
Deprecated.
Update or insert the object associated with the specified key, if its version
is less than or equal to the version specified in the argument object.
|
protected RedisFeatureStore(RedisFeatureStoreBuilder builder)
RedisFeatureStoreBuilder
.
See the RedisFeatureStoreBuilder
for information on available configuration options and what they do.
builder
- the configured builder to construct the store with.@Deprecated public RedisFeatureStore()
Components.redisFeatureStore()
instead.public 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
allData
- all objects to be storedpublic <T extends VersionedData> T get(VersionedDataKind<T> kind, java.lang.String key)
FeatureStore
get
in interface FeatureStore
T
- class of the object that will be returnedkind
- the kind of object to getkey
- the key whose associated object is to be returnedpublic <T extends VersionedData> java.util.Map<java.lang.String,T> all(VersionedDataKind<T> kind)
FeatureStore
Map
of all associated objects of a given kind.all
in interface FeatureStore
T
- class of the objects that will be returned in the mapkind
- the kind of objects to getpublic <T extends VersionedData> void upsert(VersionedDataKind<T> kind, T item)
FeatureStore
upsert
in interface FeatureStore
T
- class of the object to be updatedkind
- the kind of object to updateitem
- the object to update or insertpublic <T extends VersionedData> void delete(VersionedDataKind<T> kind, java.lang.String key, int version)
FeatureStore
delete
in interface FeatureStore
T
- class of the object to be deletedkind
- the kind of object to deletekey
- the key of the object to be deletedversion
- the version for the delete operationpublic boolean initialized()
FeatureStore
initialized
in interface FeatureStore
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public com.google.common.cache.CacheStats getCacheStats()
In the newer data store API, there is a different way to do this. See
PersistentDataStoreBuilder.cacheMonitor(com.launchdarkly.client.integrations.CacheMonitor)
.