public interface ConfigurationProvider
extends java.io.Closeable
ConfigCatClient.| Modifier and Type | Method and Description |
|---|---|
void |
forceRefresh()
Initiates a force refresh synchronously on the cached configuration.
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
forceRefreshAsync()
Initiates a force refresh asynchronously on the cached configuration.
|
java.util.Collection<java.lang.String> |
getAllKeys()
Gets a collection of all setting keys.
|
java.util.concurrent.CompletableFuture<java.util.Collection<java.lang.String>> |
getAllKeysAsync()
Gets a collection of all setting keys asynchronously.
|
java.util.Collection<java.lang.String> |
getAllVariationIds()
Gets the Variation IDs (analytics) of all feature flags or settings synchronously.
|
java.util.Collection<java.lang.String> |
getAllVariationIds(User user)
Gets the Variation IDs (analytics) of all feature flags or settings synchronously.
|
java.util.concurrent.CompletableFuture<java.util.Collection<java.lang.String>> |
getAllVariationIdsAsync()
Gets the Variation IDs (analytics) of all feature flags or settings asynchronously.
|
java.util.concurrent.CompletableFuture<java.util.Collection<java.lang.String>> |
getAllVariationIdsAsync(User user)
Gets the Variation IDs (analytics) of all feature flags or settings asynchronously.
|
<T> java.util.Map.Entry<java.lang.String,T> |
getKeyAndValue(java.lang.Class<T> classOfT,
java.lang.String variationId)
Gets the key of a setting and its value identified by the given Variation ID (analytics).
|
<T> java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,T>> |
getKeyAndValueAsync(java.lang.Class<T> classOfT,
java.lang.String variationId)
Gets the key of a setting and its value identified by the given Variation ID (analytics).
|
<T> T |
getValue(java.lang.Class<T> classOfT,
java.lang.String key,
T defaultValue)
Gets a value synchronously as T from the configuration identified by the given
key. |
<T> T |
getValue(java.lang.Class<T> classOfT,
java.lang.String key,
User user,
T defaultValue)
Gets a value synchronously as T from the configuration identified by the given
key. |
<T> java.util.concurrent.CompletableFuture<T> |
getValueAsync(java.lang.Class<T> classOfT,
java.lang.String key,
T defaultValue)
Gets a value asynchronously as T from the configuration identified by the given
key. |
<T> java.util.concurrent.CompletableFuture<T> |
getValueAsync(java.lang.Class<T> classOfT,
java.lang.String key,
User user,
T defaultValue)
Gets a value asynchronously as T from the configuration identified by the given
key. |
java.lang.String |
getVariationId(java.lang.String key,
java.lang.String defaultVariationId)
Gets the Variation ID (analytics) of a feature flag or setting synchronously based on its key.
|
java.lang.String |
getVariationId(java.lang.String key,
User user,
java.lang.String defaultVariationId)
Gets the Variation ID (analytics) of a feature flag or setting synchronously based on its key.
|
java.util.concurrent.CompletableFuture<java.lang.String> |
getVariationIdAsync(java.lang.String key,
java.lang.String defaultVariationId)
Gets the Variation ID (analytics) of a feature flag or setting asynchronously based on its key.
|
java.util.concurrent.CompletableFuture<java.lang.String> |
getVariationIdAsync(java.lang.String key,
User user,
java.lang.String defaultVariationId)
Gets the Variation ID (analytics) of a feature flag or setting asynchronously based on its key.
|
<T> T getValue(java.lang.Class<T> classOfT,
java.lang.String key,
T defaultValue)
key.T - the type of the desired config value.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the configuration value.defaultValue - in case of any failure, this value will be returned.<T> T getValue(java.lang.Class<T> classOfT,
java.lang.String key,
User user,
T defaultValue)
key.T - the type of the desired config value.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the configuration value.user - the user object to identify the caller.defaultValue - in case of any failure, this value will be returned.<T> java.util.concurrent.CompletableFuture<T> getValueAsync(java.lang.Class<T> classOfT,
java.lang.String key,
T defaultValue)
key.T - the type of the desired config value.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the configuration value.defaultValue - in case of any failure, this value will be returned.<T> java.util.concurrent.CompletableFuture<T> getValueAsync(java.lang.Class<T> classOfT,
java.lang.String key,
User user,
T defaultValue)
key.T - the type of the desired config value.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the configuration value.user - the user object to identify the caller.defaultValue - in case of any failure, this value will be returned.java.lang.String getVariationId(java.lang.String key,
java.lang.String defaultVariationId)
key - the identifier of the configuration value.defaultVariationId - in case of any failure, this value will be returned.java.lang.String getVariationId(java.lang.String key,
User user,
java.lang.String defaultVariationId)
key - the identifier of the configuration value.user - the user object to identify the caller.defaultVariationId - in case of any failure, this value will be returned.java.util.concurrent.CompletableFuture<java.lang.String> getVariationIdAsync(java.lang.String key,
java.lang.String defaultVariationId)
key - the identifier of the configuration value.defaultVariationId - in case of any failure, this value will be returned.java.util.concurrent.CompletableFuture<java.lang.String> getVariationIdAsync(java.lang.String key,
User user,
java.lang.String defaultVariationId)
key - the identifier of the configuration value.user - the user object to identify the caller.defaultVariationId - in case of any failure, this value will be returned.java.util.Collection<java.lang.String> getAllVariationIds()
java.util.concurrent.CompletableFuture<java.util.Collection<java.lang.String>> getAllVariationIdsAsync()
java.util.Collection<java.lang.String> getAllVariationIds(User user)
user - the user object to identify the caller.java.util.concurrent.CompletableFuture<java.util.Collection<java.lang.String>> getAllVariationIdsAsync(User user)
user - the user object to identify the caller.<T> java.util.Map.Entry<java.lang.String,T> getKeyAndValue(java.lang.Class<T> classOfT,
java.lang.String variationId)
T - the type of the desired config value.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.variationId - the Variation ID.<T> java.util.concurrent.CompletableFuture<java.util.Map.Entry<java.lang.String,T>> getKeyAndValueAsync(java.lang.Class<T> classOfT,
java.lang.String variationId)
T - the type of the desired config value.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.variationId - the Variation ID.java.util.Collection<java.lang.String> getAllKeys()
java.util.concurrent.CompletableFuture<java.util.Collection<java.lang.String>> getAllKeysAsync()
void forceRefresh()
java.util.concurrent.CompletableFuture<java.lang.Void> forceRefreshAsync()