You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
boolean flag = client.getBooleanValue("my-boolean-flag", false, evaluationContext);
49
+
System.out.println(flag);
50
+
}
51
+
}
34
52
```
35
53
36
54
Options can be defined using the FlagsmithProviderOptions builder. Below are all the options:
37
55
38
56
| Option name | Type | Default | Description
39
57
| ----------- | ------- | --------- | ---------
40
58
| apiKey | String | | Your API Token. Note that this is either the `Environment API` key or the `Server Side SDK Token`
59
+
| baseUri | String | https://edge.api.flagsmith.com/api/v1/ | Override the default Flagsmith API URL if you are self-hosting.
60
+
| localEvaluation | boolean | false | Controls which mode to run in; [local or remote evaluation](https://docs.flagsmith.com/clients/overview#server-side-sdks).
61
+
| environmentRefreshIntervalSeconds | int | 60 | Set environment refresh rate when using local evaluation mode
62
+
| enableAnalytics | boolean | false | Controls whether [Flag Analytics](https://docs.flagsmith.com/advanced-use/flag-analytics) data is sent to the Flagsmith API
41
63
| headers | HashMap<String, String> | | Add custom headers which will be sent with each network request to the Flagsmith API.
42
64
| envFlagsCacheKey | String | | Enable in-memory caching for the Flagsmith API.
43
65
| expireCacheAfterWriteTimeUnit | TimeUnit | TimeUnit.MINUTES | The time unit used for cache expiry after write.
@@ -46,35 +68,11 @@ Options can be defined using the FlagsmithProviderOptions builder. Below are all
46
68
| expireCacheAfterAccess | int | -1 | The integer time for cache expiry after reading.
47
69
| maxCacheSize | int | -1 | The maximum size of the cache in MB.
48
70
| recordCacheStats | boolean | false | Whether cache statistics should be recorded.
49
-
| baseUri | String | https://edge.api.flagsmith.com/api/v1/ | Override the default Flagsmith API URL if you are self-hosting.
50
71
| connectTimeout | int | 2000 | The network timeout in milliseconds.
51
72
| writeTimeout | int | 5000 | The network timeout in milliseconds when writing.
52
73
| readTimeout | int | 5000 | The network timeout in milliseconds when reading.
53
74
| sslSocketFactory | SSLSocketFactory | | Override the sslSocketFactory.
54
75
| trustManager | X509TrustManager | | X509TrustManager used when overriding the sslSocketFactory.
55
76
| httpInterceptor | Interceptor | | Add a custom HTTP interceptor in the form of an okhttp3.Interceptor object.
56
77
| retries | int | 3 | Add a custom com.flagsmith.config.Retry object to configure the backoff / retry configuration.
57
-
| localEvaluation | boolean | false | Controls which mode to run in; local or remote evaluation.
58
-
| environmentRefreshIntervalSeconds | int | 60 | Set environment refresh rate with polling manager.
59
-
| enableAnalytics | boolean | false | Controls whether Flag Analytics data is sent to the Flagsmith API
60
-
| usingBooleanConfigValue | boolean | false | Determines whether to resolve a feature value as a boolean or use the isFeatureEnabled as the flag itself. These values will be false and true respectively.
61
-
62
-
### Identity flags
63
-
64
-
In order to use specific identity flags, a targeting key must be provided in the EvaluationContext provided to the flag
65
-
evaluation method. An example of this can be seen below:
boolean flag = client.getBooleanValue("key", false);
80
-
```
78
+
| usingBooleanConfigValue | boolean | false | Determines whether to resolve a feature value as a boolean or use the isFeatureEnabled as the flag itself. These values will be false and true respectively.
0 commit comments