File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
core-api/src/main/java/com/optimizely/ab Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 1717
1818import com .optimizely .ab .annotations .VisibleForTesting ;
1919import com .optimizely .ab .bucketing .*;
20- import com .optimizely .ab .cmab .service .CmabCacheValue ;
2120import com .optimizely .ab .cmab .service .CmabService ;
22- import com .optimizely .ab .cmab .service .DefaultCmabService ;
2321import com .optimizely .ab .config .AtomicProjectConfigManager ;
2422import com .optimizely .ab .config .DatafileProjectConfig ;
2523import com .optimizely .ab .config .EventType ;
8280import java .util .Map ;
8381import java .util .concurrent .locks .ReentrantLock ;
8482
85- import com .optimizely .ab .cmab .client .CmabClient ;
8683import static com .optimizely .ab .internal .SafetyUtils .tryClose ;
8784
8885/**
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ public CmabClientConfig(@Nullable RetryConfig retryConfig) {
2929 this .retryConfig = retryConfig ;
3030 }
3131
32+ public CmabClientConfig (@ Nullable RetryConfig retryConfig , @ Nullable String cmabEndpoint ) {
33+ this .retryConfig = retryConfig ;
34+ this .cmabEndpoint = cmabEndpoint ;
35+ }
36+
3237 @ Nullable
3338 public RetryConfig getRetryConfig () {
3439 return retryConfig ;
@@ -60,4 +65,13 @@ public static CmabClientConfig withDefaultRetry() {
6065 public static CmabClientConfig withNoRetry () {
6166 return new CmabClientConfig (null );
6267 }
68+
69+ /**
70+ * Creates a config with custom cmab endpoint.
71+ *
72+ * @return A cmab client config with custom cmab endpoint
73+ */
74+ public static CmabClientConfig withCmabEndpoint (@ Nullable String cmabEndpoint ) {
75+ return new CmabClientConfig (RetryConfig .defaultConfig (), cmabEndpoint );
76+ }
6377}
You can’t perform that action at this time.
0 commit comments