Skip to content

Commit

Permalink
Remove Unused experimental API ManagedChannelBuilder.enableFullStream…
Browse files Browse the repository at this point in the history
…Decompression. (#10744)
  • Loading branch information
larry-safran authored Dec 12, 2023
1 parent 692696e commit e562a05
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 51 deletions.
6 changes: 0 additions & 6 deletions api/src/main/java/io/grpc/ForwardingChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ public T defaultLoadBalancingPolicy(String policy) {
return thisT();
}

@Override
public T enableFullStreamDecompression() {
delegate().enableFullStreamDecompression();
return thisT();
}

@Override
public T decompressorRegistry(DecompressorRegistry registry) {
delegate().decompressorRegistry(registry);
Expand Down
6 changes: 0 additions & 6 deletions api/src/main/java/io/grpc/ForwardingChannelBuilder2.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ public T defaultLoadBalancingPolicy(String policy) {
return thisT();
}

@Override
public T enableFullStreamDecompression() {
delegate().enableFullStreamDecompression();
return thisT();
}

@Override
public T decompressorRegistry(DecompressorRegistry registry) {
delegate().decompressorRegistry(registry);
Expand Down
16 changes: 0 additions & 16 deletions api/src/main/java/io/grpc/ManagedChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,6 @@ public T defaultLoadBalancingPolicy(String policy) {
throw new UnsupportedOperationException();
}

/**
* Enables full-stream decompression of inbound streams. This will cause the channel's outbound
* headers to advertise support for GZIP compressed streams, and gRPC servers which support the
* feature may respond with a GZIP compressed stream.
*
* <p>EXPERIMENTAL: This method is here to enable an experimental feature, and may be changed or
* removed once the feature is stable.
*
* @throws UnsupportedOperationException if unsupported
* @since 1.7.0
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/3399")
public T enableFullStreamDecompression() {
throw new UnsupportedOperationException();
}

/**
* Set the decompression registry for use in the channel. This is an advanced API call and
* shouldn't be used unless you are using custom message encoding. The default supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,6 @@ public ManagedChannelImplBuilder defaultLoadBalancingPolicy(String policy) {
return this;
}

@Override
public ManagedChannelImplBuilder enableFullStreamDecompression() {
this.fullStreamDecompression = true;
return this;
}

@Override
public ManagedChannelImplBuilder decompressorRegistry(DecompressorRegistry registry) {
if (registry != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,6 @@ public void fullStreamDecompression_default() {
assertFalse(builder.fullStreamDecompression);
}

@Test
public void fullStreamDecompression_enabled() {
assertEquals(builder, builder.enableFullStreamDecompression());
assertTrue(builder.fullStreamDecompression);
}

@Test
public void decompressorRegistry_default() {
assertNotNull(builder.decompressorRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public static void main(String[] args) throws Exception {
private String defaultServiceAccount;
private String serviceAccountKeyFile;
private String oauthScope;
private boolean fullStreamDecompression;
private int localHandshakerPort = -1;
private Map<String, ?> serviceConfig = null;
private int soakIterations = 10;
Expand Down Expand Up @@ -159,8 +158,6 @@ void parseArgs(String[] args) throws Exception {
serviceAccountKeyFile = value;
} else if ("oauth_scope".equals(key)) {
oauthScope = value;
} else if ("full_stream_decompression".equals(key)) {
fullStreamDecompression = Boolean.parseBoolean(value);
} else if ("local_handshaker_port".equals(key)) {
localHandshakerPort = Integer.parseInt(value);
} else if ("service_config_json".equals(key)) {
Expand Down Expand Up @@ -226,8 +223,6 @@ void parseArgs(String[] args) throws Exception {
+ "\n --service_account_key_file Path to service account json key file."
+ c.serviceAccountKeyFile
+ "\n --oauth_scope Scope for OAuth tokens. Default " + c.oauthScope
+ "\n --full_stream_decompression Enable full-stream decompression. Default "
+ c.fullStreamDecompression
+ "\n --service_config_json=SERVICE_CONFIG_JSON"
+ "\n Disables service config lookups and sets the provided "
+ "\n string as the default service config."
Expand Down Expand Up @@ -638,9 +633,6 @@ protected ManagedChannelBuilder<?> createChannelBuilder() {
if (serverHostOverride != null) {
nettyBuilder.overrideAuthority(serverHostOverride);
}
if (fullStreamDecompression) {
nettyBuilder.enableFullStreamDecompression();
}
// Disable the default census stats interceptor, use testing interceptor instead.
InternalNettyChannelBuilder.setStatsEnabled(nettyBuilder, false);
if (serviceConfig != null) {
Expand All @@ -664,9 +656,6 @@ protected ManagedChannelBuilder<?> createChannelBuilder() {
okBuilder.overrideAuthority(
GrpcUtil.authorityFromHostAndPort(serverHostOverride, serverPort));
}
if (fullStreamDecompression) {
okBuilder.enableFullStreamDecompression();
}
// Disable the default census stats interceptor, use testing interceptor instead.
InternalOkHttpChannelBuilder.setStatsEnabled(okBuilder, false);
if (serviceConfig != null) {
Expand Down

0 comments on commit e562a05

Please sign in to comment.