1
1
package com .eppo .sdk ;
2
2
3
3
import cloud .eppo .BaseEppoClient ;
4
- import cloud .eppo .api .Configuration ;
5
4
import cloud .eppo .logging .AssignmentLogger ;
6
5
import cloud .eppo .logging .BanditLogger ;
7
6
import com .eppo .sdk .helpers .AppDetails ;
8
7
import com .eppo .sdk .helpers .FetchConfigurationsTask ;
9
8
import java .util .Timer ;
10
- import java .util .concurrent .CompletableFuture ;
11
9
import org .slf4j .Logger ;
12
10
import org .slf4j .LoggerFactory ;
13
11
@@ -43,8 +41,7 @@ private EppoClient(
43
41
String sdkVersion ,
44
42
AssignmentLogger assignmentLogger ,
45
43
BanditLogger banditLogger ,
46
- boolean isGracefulModel ,
47
- CompletableFuture <Configuration > initialConfiguration ) {
44
+ boolean isGracefulModel ) {
48
45
super (
49
46
apiKey ,
50
47
host ,
@@ -56,7 +53,7 @@ private EppoClient(
56
53
isGracefulModel ,
57
54
false ,
58
55
true ,
59
- initialConfiguration );
56
+ null );
60
57
}
61
58
62
59
/** Stops the client from polling Eppo for updated flag and bandit configurations */
@@ -75,7 +72,6 @@ public static class Builder {
75
72
private boolean forceReinitialize = DEFAULT_FORCE_REINITIALIZE ;
76
73
private long pollingIntervalMs = DEFAULT_POLLING_INTERVAL_MS ;
77
74
private String host = DEFAULT_HOST ;
78
- private CompletableFuture <Configuration > initialConfiguration ;
79
75
80
76
/** Sets the API Key--created within the eppo application--to use. This is required. */
81
77
public Builder apiKey (String apiKey ) {
@@ -139,12 +135,6 @@ public Builder host(String host) {
139
135
return this ;
140
136
}
141
137
142
- /** Sets the initial configuration for the client. */
143
- public Builder initialConfiguration (CompletableFuture <Configuration > initialConfiguration ) {
144
- this .initialConfiguration = initialConfiguration ;
145
- return this ;
146
- }
147
-
148
138
public EppoClient buildAndInit () {
149
139
AppDetails appDetails = AppDetails .getInstance ();
150
140
String sdkName = appDetails .getName ();
@@ -163,14 +153,7 @@ public EppoClient buildAndInit() {
163
153
164
154
instance =
165
155
new EppoClient (
166
- apiKey ,
167
- sdkName ,
168
- sdkVersion ,
169
- host ,
170
- assignmentLogger ,
171
- banditLogger ,
172
- isGracefulMode ,
173
- initialConfiguration );
156
+ apiKey , sdkName , sdkVersion , host , assignmentLogger , banditLogger , isGracefulMode );
174
157
175
158
// Stop any active polling
176
159
stopPolling ();
0 commit comments