@@ -139,7 +139,6 @@ public static class Builder {
139139 private ThreadFactory threadFactory ;
140140 private int flushQueueSize ;
141141 private int maximumFlushAttempts ;
142- private int maximumQueueSizeInBytes ;
143142 private long flushIntervalInMillis ;
144143 private int queueCapacity ;
145144 private boolean forceTlsV1 = false ;
@@ -267,17 +266,6 @@ public Builder flushQueueSize(int flushQueueSize) {
267266 return this ;
268267 }
269268
270- /** Set the queueSize at which flushes should be triggered. */
271- @ Beta
272- public Builder maximumQueueSizeInBytes (int bytes ) {
273- if (bytes < 1 ) {
274- throw new IllegalArgumentException ("maximumQueueSizeInBytes must not be less than 1." );
275- }
276-
277- this .maximumQueueSizeInBytes = bytes ;
278- return this ;
279- }
280-
281269 /** Set the interval at which the queue should be flushed. */
282270 @ Beta
283271 public Builder flushInterval (long flushInterval , TimeUnit unit ) {
@@ -369,9 +357,6 @@ public Analytics build() {
369357 if (flushQueueSize == 0 ) {
370358 flushQueueSize = Platform .get ().defaultFlushQueueSize ();
371359 }
372- if (maximumQueueSizeInBytes == 0 ) {
373- maximumQueueSizeInBytes = MESSAGE_QUEUE_MAX_BYTE_SIZE ;
374- }
375360 if (maximumFlushAttempts == 0 ) {
376361 maximumFlushAttempts = 3 ;
377362 }
@@ -430,20 +415,17 @@ public void log(String message) {
430415
431416 SegmentService segmentService = restAdapter .create (SegmentService .class );
432417
433- AnalyticsClient analyticsClient =
434- AnalyticsClient .create (
435- endpoint ,
436- segmentService ,
437- queueCapacity ,
438- flushQueueSize ,
439- flushIntervalInMillis ,
440- maximumFlushAttempts ,
441- maximumQueueSizeInBytes ,
442- log ,
443- threadFactory ,
444- networkExecutor ,
445- writeKey ,
446- gson );
418+ AnalyticsClient analyticsClient = AnalyticsClient .create (
419+ endpoint ,
420+ segmentService ,
421+ queueCapacity ,
422+ flushQueueSize ,
423+ flushIntervalInMillis ,
424+ log ,
425+ threadFactory ,
426+ networkExecutor ,
427+ writeKey ,
428+ gson );
447429
448430 return new Analytics (analyticsClient , messageTransformers , messageInterceptors , log );
449431 }
0 commit comments