
com.launchdarkly.sdk.server.integrations.Redis Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of launchdarkly-java-server-sdk-redis-store Show documentation
Show all versions of launchdarkly-java-server-sdk-redis-store Show documentation
LaunchDarkly Java SDK Redis integration
package com.launchdarkly.sdk.server.integrations;
/**
* Integration between the LaunchDarkly SDK and Redis.
*
* @since 4.12.0
*/
public abstract class Redis {
/**
* Returns a builder object for creating a Redis-backed data store.
*
* This object can be modified with {@link RedisDataStoreBuilder} methods for any desired
* custom Redis options. Then, pass it to {@link com.launchdarkly.sdk.server.Components#persistentDataStore(com.launchdarkly.sdk.server.interfaces.PersistentDataStoreFactory)}
* and set any desired caching options. Finally, pass the result to
* {@link com.launchdarkly.sdk.server.LDConfig.Builder#dataStore(com.launchdarkly.sdk.server.interfaces.DataStoreFactory)}.
* For example:
*
*
* LDConfig config = new LDConfig.Builder()
* .dataStore(
* Components.persistentDataStore(
* Redis.dataStore().url("redis://my-redis-host")
* ).cacheSeconds(15)
* )
* .build();
*
*
* @return a data store configuration object
*/
public static RedisDataStoreBuilder dataStore() {
return new RedisDataStoreBuilder();
}
private Redis() {}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy