public interface ConfigurationProvider
extends java.io.Closeable
ConfigCatClient.| Modifier and Type | Method and Description |
|---|---|
void |
clearDefaultUser()
Set default user value to null.
|
RefreshResult |
forceRefresh()
Initiates a force refresh synchronously on the cached configuration.
|
java.util.concurrent.CompletableFuture<RefreshResult> |
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.List<EvaluationDetails<java.lang.Object>> |
getAllValueDetails(User user)
Gets the detailed values of all feature flags or settings synchronously.
|
java.util.concurrent.CompletableFuture<java.util.List<EvaluationDetails<java.lang.Object>>> |
getAllValueDetailsAsync(User user)
Gets the detailed values of all feature flags or settings asynchronously.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAllValues(User user)
Gets the values of all feature flags or settings synchronously.
|
java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> |
getAllValuesAsync(User user)
Gets the values of all feature flags or settings asynchronously.
|
ConfigCatHooks |
getHooks()
Access to hooks for event subscription.
|
<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 the value of a feature flag or setting as T identified by the given
key. |
<T> T |
getValue(java.lang.Class<T> classOfT,
java.lang.String key,
User user,
T defaultValue)
Gets the value of a feature flag or setting as T asynchronously identified by the given
key. |
<T> java.util.concurrent.CompletableFuture<T> |
getValueAsync(java.lang.Class<T> classOfT,
java.lang.String key,
T defaultValue)
Gets the value of a feature flag or setting as T 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 the value of a feature flag or setting as T asynchronously identified by the given
key. |
<T> EvaluationDetails<T> |
getValueDetails(java.lang.Class<T> classOfT,
java.lang.String key,
T defaultValue)
Gets the value of a feature flag or setting as T identified by the given
key. |
<T> EvaluationDetails<T> |
getValueDetails(java.lang.Class<T> classOfT,
java.lang.String key,
User user,
T defaultValue)
Gets the value of a feature flag or setting as T identified by the given
key. |
<T> java.util.concurrent.CompletableFuture<EvaluationDetails<T>> |
getValueDetailsAsync(java.lang.Class<T> classOfT,
java.lang.String key,
T defaultValue)
Gets the value of a feature flag or setting as T asynchronously identified by the given
key. |
<T> java.util.concurrent.CompletableFuture<EvaluationDetails<T>> |
getValueDetailsAsync(java.lang.Class<T> classOfT,
java.lang.String key,
User user,
T defaultValue)
Gets the value of a feature flag or setting as T asynchronously identified by the given
key. |
boolean |
isClosed()
Get the client closed status.
|
boolean |
isOffline()
Get the client offline mode status.
|
void |
setDefaultUser(User defaultUser)
Sets defaultUser value.
|
void |
setOffline()
Set the client to offline mode.
|
void |
setOnline()
Set the client to online mode.
|
<T> T getValue(java.lang.Class<T> classOfT,
java.lang.String key,
T defaultValue)
key.T - the type of the desired feature flag or setting.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the feature flag or setting.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 feature flag or setting.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the feature flag or setting.user - the user object.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 feature flag or setting.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the feature flag or setting.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 feature flag or setting.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the feature flag or setting.user - the user object.defaultValue - in case of any failure, this value will be returned.<T> EvaluationDetails<T> getValueDetails(java.lang.Class<T> classOfT, java.lang.String key, T defaultValue)
key.T - the type of the desired feature flag or setting.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the feature flag or setting.defaultValue - in case of any failure, this value will be returned.<T> EvaluationDetails<T> getValueDetails(java.lang.Class<T> classOfT, java.lang.String key, User user, T defaultValue)
key.T - the type of the desired feature flag or setting.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the feature flag or setting.user - the user object.defaultValue - in case of any failure, this value will be returned.<T> java.util.concurrent.CompletableFuture<EvaluationDetails<T>> getValueDetailsAsync(java.lang.Class<T> classOfT, java.lang.String key, T defaultValue)
key.T - the type of the desired feature flag or setting.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the feature flag or setting.defaultValue - in case of any failure, this value will be returned.<T> java.util.concurrent.CompletableFuture<EvaluationDetails<T>> getValueDetailsAsync(java.lang.Class<T> classOfT, java.lang.String key, User user, T defaultValue)
key.T - the type of the desired feature flag or setting.classOfT - the class of T. Only String, Integer, Double or Boolean types are supported.key - the identifier of the feature flag or setting.user - the user object.defaultValue - in case of any failure, this value will be returned.java.util.Map<java.lang.String,java.lang.Object> getAllValues(User user)
user - the user object.java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,java.lang.Object>> getAllValuesAsync(User user)
user - the user object.java.util.List<EvaluationDetails<java.lang.Object>> getAllValueDetails(User user)
user - the user object.java.util.concurrent.CompletableFuture<java.util.List<EvaluationDetails<java.lang.Object>>> getAllValueDetailsAsync(User user)
user - the user object.<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 feature flag or setting.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 feature flag or setting.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()
RefreshResult forceRefresh()
java.util.concurrent.CompletableFuture<RefreshResult> forceRefreshAsync()
void setDefaultUser(User defaultUser)
defaultUser - The new default user.void clearDefaultUser()
boolean isClosed()
void setOnline()
void setOffline()
boolean isOffline()
ConfigCatHooks getHooks()