public static class ConfigCatClient.Builder
extends java.lang.Object
ConfigCatClient instance.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ConfigCatClient.Builder |
baseUrl(java.lang.String baseUrl)
Sets the base ConfigCat CDN url.
|
ConfigCatClient |
build(java.lang.String sdkKey)
Builds the configured
ConfigCatClient instance. |
ConfigCatClient.Builder |
cache(ConfigCache cache)
Sets the internal cache implementation.
|
ConfigCatClient.Builder |
dataGovernance(DataGovernance dataGovernance)
Default: Global.
|
ConfigCatClient.Builder |
httpClient(okhttp3.OkHttpClient httpClient)
Sets the underlying http client which will be used to fetch the latest configuration.
|
ConfigCatClient.Builder |
maxWaitTimeForSyncCallsInSeconds(int maxWaitTimeForSyncCallsInSeconds)
Sets the maximum time in seconds at most how long the synchronous calls
e.g.
|
ConfigCatClient.Builder |
mode(PollingMode pollingMode)
Sets the internal refresh policy implementation.
|
public ConfigCatClient.Builder httpClient(okhttp3.OkHttpClient httpClient)
httpClient - the http client.public ConfigCatClient.Builder cache(ConfigCache cache)
cache - a ConfigFetcher implementation used to cache the configuration.public ConfigCatClient.Builder baseUrl(java.lang.String baseUrl)
baseUrl - the base ConfigCat CDN url.public ConfigCatClient.Builder mode(PollingMode pollingMode)
pollingMode - the polling mode.public ConfigCatClient.Builder dataGovernance(DataGovernance dataGovernance)
dataGovernance - the DataGovernance parameter.public ConfigCatClient.Builder maxWaitTimeForSyncCallsInSeconds(int maxWaitTimeForSyncCallsInSeconds)
client.getConfiguration(...) have to be blocked.maxWaitTimeForSyncCallsInSeconds - the maximum time in seconds at most how long the synchronous calls
e.g. client.getConfiguration(...) have to be blocked.java.lang.IllegalArgumentException - when the given value is lesser than 2.public ConfigCatClient build(java.lang.String sdkKey)
ConfigCatClient instance.sdkKey - the project token.ConfigCatClient instance.