Skip to content

Commit

Permalink
Merge pull request #1052 from Sineaggi/upgrade-grpc
Browse files Browse the repository at this point in the history
Upgrade grpc and remove unused method
  • Loading branch information
yidongnan authored Apr 12, 2024
2 parents afa6d3c + 0a5324d commit 7bd1516
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 54 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
projectVersion = '3.0.0.RELEASE'

// https://github.com/grpc/grpc-java/releases
grpcVersion = '1.60.1'
grpcVersion = '1.61.1'

// https://github.com/google/guava/releases
guavaVersion = '33.1.0-jre'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ protected void configure(final T builder, final String name) {
configureKeepAlive(builder, name);
configureSecurity(builder, name);
configureLimits(builder, name);
configureCompression(builder, name);
configureUserAgent(builder, name);
for (final GrpcChannelConfigurer channelConfigurer : this.channelConfigurers) {
channelConfigurer.accept(builder, name);
Expand Down Expand Up @@ -251,19 +250,6 @@ protected void configureLimits(final T builder, final String name) {
}
}

/**
* Configures the compression options that should be used by the channel.
*
* @param builder The channel builder to configure.
* @param name The name of the client to configure.
*/
protected void configureCompression(final T builder, final String name) {
final GrpcChannelProperties properties = getPropertiesFor(name);
if (properties.isFullStreamDecompression()) {
builder.enableFullStreamDecompression();
}
}

/**
* Configures custom User-Agent for the channel.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,35 +372,6 @@ public void setMaxInboundMetadataSize(DataSize maxInboundMetadataSize) {
}
// --------------------------------------------------

private Boolean fullStreamDecompression;
private static final boolean DEFAULT_FULL_STREAM_DECOMPRESSION = false;

/**
* Gets whether full-stream decompression of inbound streams should be enabled.
*
* @return True, if full-stream decompression of inbound streams should be enabled. False otherwise.
*
* @see #setFullStreamDecompression(Boolean)
*/
public boolean isFullStreamDecompression() {
return this.fullStreamDecompression == null ? DEFAULT_FULL_STREAM_DECOMPRESSION : this.fullStreamDecompression;
}

/**
* Sets whether full-stream decompression of inbound streams should be enabled. 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.
*
* @param fullStreamDecompression Whether full stream decompression should be enabled or null to use the fallback.
*
* @see ManagedChannelBuilder#enableFullStreamDecompression()
*/
public void setFullStreamDecompression(final Boolean fullStreamDecompression) {
this.fullStreamDecompression = fullStreamDecompression;
}

// --------------------------------------------------

private NegotiationType negotiationType;
private static final NegotiationType DEFAULT_NEGOTIATION_TYPE = NegotiationType.TLS;

Expand Down Expand Up @@ -530,9 +501,6 @@ public void copyDefaultsFrom(final GrpcChannelProperties config) {
if (this.maxInboundMessageSize == null) {
this.maxInboundMessageSize = config.maxInboundMessageSize;
}
if (this.fullStreamDecompression == null) {
this.fullStreamDecompression = config.fullStreamDecompression;
}
if (this.negotiationType == null) {
this.negotiationType = config.negotiationType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@
"description": "Whether keepAlive should be enabled.",
"defaultValue": false
},
{
"name": "grpc.client.GLOBAL.full-stream-decompression",
"type": "java.lang.Boolean",
"sourceType": "net.devh.boot.grpc.client.config.GrpcChannelProperties",
"description": "Whether full-stream decompression of inbound streams should be enabled.",
"defaultValue": false
},
{
"name": "grpc.client.GLOBAL.keep-alive-time",
"type": "java.time.Duration",
Expand Down

0 comments on commit 7bd1516

Please sign in to comment.