@@ -34,7 +34,7 @@ public final class LDConfig {
3434 private static final int DEFAULT_CONNECT_TIMEOUT_MILLIS = 2000 ;
3535 private static final int DEFAULT_SOCKET_TIMEOUT_MILLIS = 10000 ;
3636 private static final int DEFAULT_FLUSH_INTERVAL_SECONDS = 5 ;
37- private static final long DEFAULT_POLLING_INTERVAL_MILLIS = 1000L ;
37+ private static final long MIN_POLLING_INTERVAL_MILLIS = 30000L ;
3838 private static final long DEFAULT_START_WAIT_MILLIS = 5000L ;
3939 private static final int DEFAULT_SAMPLING_INTERVAL = 0 ;
4040
@@ -78,8 +78,8 @@ protected LDConfig(Builder builder) {
7878 this .useLdd = builder .useLdd ;
7979 this .offline = builder .offline ;
8080 this .sendEvents = builder .sendEvents ;
81- if (builder .pollingIntervalMillis < DEFAULT_POLLING_INTERVAL_MILLIS ) {
82- this .pollingIntervalMillis = DEFAULT_POLLING_INTERVAL_MILLIS ;
81+ if (builder .pollingIntervalMillis < MIN_POLLING_INTERVAL_MILLIS ) {
82+ this .pollingIntervalMillis = MIN_POLLING_INTERVAL_MILLIS ;
8383 } else {
8484 this .pollingIntervalMillis = builder .pollingIntervalMillis ;
8585 }
@@ -152,7 +152,7 @@ public static class Builder {
152152 private boolean useLdd = false ;
153153 private boolean offline = false ;
154154 private boolean sendEvents = true ;
155- private long pollingIntervalMillis = DEFAULT_POLLING_INTERVAL_MILLIS ;
155+ private long pollingIntervalMillis = MIN_POLLING_INTERVAL_MILLIS ;
156156 private FeatureStore featureStore = new InMemoryFeatureStore ();
157157 private long startWaitMillis = DEFAULT_START_WAIT_MILLIS ;
158158 private int samplingInterval = DEFAULT_SAMPLING_INTERVAL ;
@@ -203,7 +203,8 @@ public Builder featureStore(FeatureStore store) {
203203 }
204204
205205 /**
206- * Set whether streaming mode should be enabled. By default, streaming is enabled.
206+ * Set whether streaming mode should be enabled. By default, streaming is enabled. It should only be
207+ * disabled on the advice of LaunchDarkly support.
207208 *
208209 * @param stream whether streaming mode should be enabled
209210 * @return the builder
@@ -392,8 +393,8 @@ public Builder sendEvents(boolean sendEvents) {
392393 }
393394
394395 /**
395- * Set the polling interval (when streaming is disabled). Values less than the default of 1000
396- * will be set to 1000 .
396+ * Set the polling interval (when streaming is disabled). Values less than the default of
397+ * 30000 will be set to the default .
397398 *
398399 * @param pollingIntervalMillis rule update polling interval in milliseconds.
399400 * @return the builder
0 commit comments