mirror of https://github.com/grpc/grpc-java.git
api,netty: fix MethodDescriptor and InternalKnownTransport for netty-shaded
Resolves #6765
This commit is contained in:
parent
bf2a66c8a2
commit
5677a0b723
|
@ -24,6 +24,7 @@ package io.grpc;
|
||||||
@Internal
|
@Internal
|
||||||
public enum InternalKnownTransport {
|
public enum InternalKnownTransport {
|
||||||
NETTY,
|
NETTY,
|
||||||
|
NETTY_SHADED,
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,7 @@ public final class MethodDescriptor<ReqT, RespT> {
|
||||||
|
|
||||||
// Must be set to InternalKnownTransport.values().length
|
// Must be set to InternalKnownTransport.values().length
|
||||||
// Not referenced to break the dependency.
|
// Not referenced to break the dependency.
|
||||||
private final AtomicReferenceArray<Object> rawMethodNames = new AtomicReferenceArray<>(1);
|
private final AtomicReferenceArray<Object> rawMethodNames = new AtomicReferenceArray<>(2);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the cached "raw" method name for this Method Descriptor. The raw name is transport
|
* Gets the cached "raw" method name for this Method Descriptor. The raw name is transport
|
||||||
|
|
|
@ -54,7 +54,9 @@ import javax.annotation.Nullable;
|
||||||
*/
|
*/
|
||||||
class NettyClientStream extends AbstractClientStream {
|
class NettyClientStream extends AbstractClientStream {
|
||||||
private static final InternalMethodDescriptor methodDescriptorAccessor =
|
private static final InternalMethodDescriptor methodDescriptorAccessor =
|
||||||
new InternalMethodDescriptor(InternalKnownTransport.NETTY);
|
new InternalMethodDescriptor(
|
||||||
|
NettyClientTransport.class.getName().contains("grpc.netty.shaded")
|
||||||
|
? InternalKnownTransport.NETTY_SHADED : InternalKnownTransport.NETTY);
|
||||||
|
|
||||||
private final Sink sink = new Sink();
|
private final Sink sink = new Sink();
|
||||||
private final TransportState state;
|
private final TransportState state;
|
||||||
|
|
Loading…
Reference in New Issue