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.
|
<T extends RefreshPolicy> |
getRefreshPolicy(java.lang.Class<T> classOfT)
Gets the internal refresh policy.
|
<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. |
<T extends RefreshPolicy> T getRefreshPolicy(java.lang.Class<T> classOfT)
T - the type of the desired policy.classOfT - the class of T.<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.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()