diff options
author | zpencer <spencerfang@google.com> | 2017-11-15 11:49:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-15 11:49:13 -0800 |
commit | 2f155606b8aa2548420ced9bd8033861fdb2562a (patch) | |
tree | 9c73d00eb5f7da8175cef2629022b8e1927bdb82 /netty | |
parent | df357cb8d3c38ab9565ea19a113a3f6345dac4f5 (diff) | |
download | grpc-grpc-java-2f155606b8aa2548420ced9bd8033861fdb2562a.tar.gz |
core,netty: add ID to NettyServer (#3745)
These are already WithLogId:
ManagedChannelImpl, InternalSubchannel, ServerTransport
Diffstat (limited to 'netty')
-rw-r--r-- | netty/src/main/java/io/grpc/netty/NettyServer.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/netty/src/main/java/io/grpc/netty/NettyServer.java b/netty/src/main/java/io/grpc/netty/NettyServer.java index 12e7179d2..6fb594ad2 100644 --- a/netty/src/main/java/io/grpc/netty/NettyServer.java +++ b/netty/src/main/java/io/grpc/netty/NettyServer.java @@ -23,10 +23,12 @@ import static io.netty.channel.ChannelOption.SO_KEEPALIVE; import io.grpc.ServerStreamTracer; import io.grpc.internal.InternalServer; +import io.grpc.internal.LogId; import io.grpc.internal.ServerListener; import io.grpc.internal.ServerTransportListener; import io.grpc.internal.SharedResourceHolder; import io.grpc.internal.TransportTracer; +import io.grpc.internal.WithLogId; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; @@ -48,9 +50,10 @@ import javax.annotation.Nullable; /** * Netty-based server implementation. */ -class NettyServer implements InternalServer { +class NettyServer implements InternalServer, WithLogId { private static final Logger log = Logger.getLogger(InternalServer.class.getName()); + private final LogId logId = LogId.allocate(getClass().getName()); private final SocketAddress address; private final Class<? extends ServerChannel> channelType; private final ProtocolNegotiator protocolNegotiator; @@ -218,6 +221,11 @@ class NettyServer implements InternalServer { } } + @Override + public LogId getLogId() { + return logId; + } + class EventLoopReferenceCounter extends AbstractReferenceCounted { @Override protected void deallocate() { |