Skip to content

Commit d98c26e

Browse files
Merge branch 'development' of github.com:splitio/java-client into revalidate-stale-connections
# Conflicts: # client/pom.xml # client/src/main/java/io/split/client/SplitClientConfig.java # pom.xml # testing/pom.xml
1 parent 8366a85 commit d98c26e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

client/src/main/java/io/split/client/SplitClientConfig.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ public int get_telemetryRefreshRate() {
291291

292292
public long validateAfterInactivityInMillis() {
293293
return _validateAfterInactivityInMillis;
294+
}
294295

295296
public static final class Builder {
296297

@@ -328,12 +329,12 @@ public static final class Builder {
328329
private String _authServiceURL = AUTH_ENDPOINT;
329330
private String _streamingServiceURL = STREAMING_ENDPOINT;
330331
private String _telemetryURl = TELEMETRY_ENDPOINT;
331-
private int _telemetryRefreshRate = 60;
332+
private int _telemetryRefreshRate = 3600;
332333
private int _onDemandFetchRetryDelayMs = 50;
333334
private final int _onDemandFetchMaxRetries = 10;
334335
private final int _failedAttemptsBeforeLogging = 10;
335336
private final boolean _cdnDebugLogging = true;
336-
private long _validateAfterInactivityInMillis = -1;
337+
private long _validateAfterInactivityInMillis = 500;
337338

338339
public Builder() {
339340
}
@@ -725,7 +726,7 @@ public Builder streamingServiceURL(String streamingServiceURL) {
725726
return this;
726727
}
727728

728-
* Set telemetry service URL.
729+
/** Set telemetry service URL.
729730
* @param telemetryURL
730731
* @return
731732
*/
@@ -752,6 +753,8 @@ public Builder telemetryRefreshRate(int telemetryRefreshRate) {
752753
*/
753754
public Builder validateAfterInactivityInMillis(long validateAfterInactivityInMillis) {
754755
_validateAfterInactivityInMillis = validateAfterInactivityInMillis;
756+
return this;
757+
}
755758

756759
public SplitClientConfig build() {
757760
if (_featuresRefreshRate < 5 ) {
@@ -830,10 +833,15 @@ public SplitClientConfig build() {
830833
if (_onDemandFetchRetryDelayMs <= 0) {
831834
throw new IllegalStateException("streamingRetryDelay must be > 0");
832835
}
836+
833837
if(_onDemandFetchMaxRetries <= 0) {
834838
throw new IllegalStateException("_onDemandFetchMaxRetries must be > 0");
835839
}
836840

841+
if(_telemetryRefreshRate <= 60) {
842+
throw new IllegalStateException("_telemetryRefreshRate must be >= 60");
843+
}
844+
837845
return new SplitClientConfig(
838846
_endpoint,
839847
_eventsEndpoint,

0 commit comments

Comments
 (0)