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
Copy file name to clipboardExpand all lines: README.md
+9-20
Original file line number
Diff line number
Diff line change
@@ -113,10 +113,8 @@ you will receive the client in an uninitialized state where feature flags will r
113
113
continue trying to connect in the background unless there has been an `java.net.ProtocolException` or you close the
114
114
client(using `close()`). You can detect whether initialization has succeeded by calling `isInitialized()`.
115
115
116
-
If `isInitialized()` returns `true`, you can use the client as normal. If it returns `false`, **_maybe SDK is not yet initialized
117
-
or no feature flag has been set in your environment_**.
118
-
119
-
`isInitialized()` is optional, but it is recommended that you use it to avoid to get default values when the SDK is not yet initialized.
116
+
If `isInitialized()` returns True, it means SDK has succeeded at some point in connecting to feature flag center,
117
+
otherwise client has not yet connected to feature flag center, or has permanently failed. In this state, feature flag evaluations will always return default values.
120
118
121
119
```java
122
120
FBConfig config =newFBConfig.Builder()
@@ -148,7 +146,10 @@ if (inited) {
148
146
// the client is ready
149
147
}
150
148
```
151
-
It's optional to wait for initialization to finish, but it is recommended that you do that to avoid to get default values when the SDK is not yet initialized.
149
+
150
+
`waitForOKState` method that will block until the client has successfully connected, or until the timeout expires.
151
+
152
+
> To check if the client is ready is optional. Even if the client is not ready, you can still evaluate feature flags, but the default value will be returned if SDK is not yet initialized.
152
153
153
154
154
155
### FBConfig and Components
@@ -236,9 +237,6 @@ in real time, as mentioned in [Bootstrapping](#boostrapping).
236
237
After initialization, the SDK has all the feature flags in the memory and all evaluation is done _**locally and
237
238
synchronously**_, the average evaluation time is < _**10**_ ms.
238
239
239
-
If evaluation called before Java SDK client initialized, or you set the wrong flag key or user for the evaluation, SDK will return
240
-
the default value you set.
241
-
242
240
There is a `variation` method that returns a flag value, and a `variationDetail` method that returns an object
243
241
describing how the value was determined for each type.
0 commit comments