77public class Config {
88 public final String token ;
99 public final AppendRetryPolicy appendRetryPolicy ;
10+ public final Boolean compression ;
1011 public final Endpoints endpoints ;
1112 public final Integer maxAppendInflightBytes ;
1213 public final Integer maxRetries ;
@@ -17,6 +18,7 @@ public class Config {
1718 private Config (
1819 String token ,
1920 AppendRetryPolicy appendRetryPolicy ,
21+ Boolean compression ,
2022 Endpoints endpoints ,
2123 Integer maxAppendInflightBytes ,
2224 Integer maxRetries ,
@@ -25,6 +27,7 @@ private Config(
2527 String userAgent ) {
2628 this .token = token ;
2729 this .appendRetryPolicy = appendRetryPolicy ;
30+ this .compression = compression ;
2831 this .endpoints = endpoints ;
2932 this .maxAppendInflightBytes = maxAppendInflightBytes ;
3033 this .maxRetries = maxRetries ;
@@ -46,6 +49,7 @@ public static final class ConfigBuilder {
4649 private Optional <Duration > requestTimeout = Optional .empty ();
4750 private Optional <Duration > retryDelay = Optional .empty ();
4851 private Optional <String > userAgent = Optional .empty ();
52+ private Optional <Boolean > compression = Optional .empty ();
4953
5054 ConfigBuilder (String token ) {
5155 this .token = token ;
@@ -56,6 +60,11 @@ public ConfigBuilder withAppendRetryPolicy(AppendRetryPolicy appendRetryPolicy)
5660 return this ;
5761 }
5862
63+ public ConfigBuilder withCompression (Boolean compression ) {
64+ this .compression = Optional .of (compression );
65+ return this ;
66+ }
67+
5968 public ConfigBuilder withEndpoints (Endpoints endpoints ) {
6069 this .endpoints = Optional .of (endpoints );
6170 return this ;
@@ -91,6 +100,7 @@ public Config build() {
91100 return new Config (
92101 this .token ,
93102 this .appendRetryPolicy .orElse (AppendRetryPolicy .ALL ),
103+ this .compression .orElse (false ),
94104 this .endpoints .orElse (Endpoints .forCloud (Cloud .AWS )),
95105 this .maxAppendInflightBytes .orElse (Integer .MAX_VALUE ),
96106 this .maxRetries .orElse (3 ),
0 commit comments