@Test public void getSubchannel() { InternalInstrumented<ChannelStats> sub = create(); assertNull(channelz.getSubchannel(id(sub))); channelz.addSubchannel(sub); assertSame(sub, channelz.getSubchannel(id(sub))); assertNull(channelz.getChannel(id(sub))); channelz.removeSubchannel(sub); assertNull(channelz.getSubchannel(id(sub))); }
@Nullable public InternalInstrumented<ChannelStats> getSubchannel(long id) { return subchannels.get(id); }
InternalChannelz { @Nullable public InternalInstrumented<ChannelStats> getSubchannel(long id) { return subchannels.get(id); } }
InternalChannelz { @Nullable public InternalInstrumented<ChannelStats> getSubchannel(long id) { return subchannels.get(id); } @VisibleForTesting  InternalChannelz(); }
InternalChannelz { @Nullable public InternalInstrumented<ChannelStats> getSubchannel(long id) { return subchannels.get(id); } @VisibleForTesting  InternalChannelz(); static InternalChannelz instance(); void addServer(InternalInstrumented<ServerStats> server); void addSubchannel(InternalInstrumented<ChannelStats> subchannel); void addRootChannel(InternalInstrumented<ChannelStats> rootChannel); void addClientSocket(InternalInstrumented<SocketStats> socket); void addListenSocket(InternalInstrumented<SocketStats> socket); void addServerSocket(
      InternalInstrumented<ServerStats> server, InternalInstrumented<SocketStats> socket); void removeServer(InternalInstrumented<ServerStats> server); void removeSubchannel(InternalInstrumented<ChannelStats> subchannel); void removeRootChannel(InternalInstrumented<ChannelStats> channel); void removeClientSocket(InternalInstrumented<SocketStats> socket); void removeListenSocket(InternalInstrumented<SocketStats> socket); void removeServerSocket(
      InternalInstrumented<ServerStats> server, InternalInstrumented<SocketStats> socket); RootChannelList getRootChannels(long fromId, int maxPageSize); @Nullable InternalInstrumented<ChannelStats> getChannel(long id); @Nullable InternalInstrumented<ChannelStats> getSubchannel(long id); ServerList getServers(long fromId, int maxPageSize); @Nullable ServerSocketsList getServerSockets(long serverId, long fromId, int maxPageSize); @Nullable InternalInstrumented<SocketStats> getSocket(long id); @VisibleForTesting boolean containsServer(InternalLogId serverRef); @VisibleForTesting boolean containsSubchannel(InternalLogId subchannelRef); InternalInstrumented<ChannelStats> getRootChannel(long id); @VisibleForTesting boolean containsClientSocket(InternalLogId transportRef); static long id(InternalWithLogId withLogId); }
InternalChannelz { @Nullable public InternalInstrumented<ChannelStats> getSubchannel(long id) { return subchannels.get(id); } @VisibleForTesting  InternalChannelz(); static InternalChannelz instance(); void addServer(InternalInstrumented<ServerStats> server); void addSubchannel(InternalInstrumented<ChannelStats> subchannel); void addRootChannel(InternalInstrumented<ChannelStats> rootChannel); void addClientSocket(InternalInstrumented<SocketStats> socket); void addListenSocket(InternalInstrumented<SocketStats> socket); void addServerSocket(
      InternalInstrumented<ServerStats> server, InternalInstrumented<SocketStats> socket); void removeServer(InternalInstrumented<ServerStats> server); void removeSubchannel(InternalInstrumented<ChannelStats> subchannel); void removeRootChannel(InternalInstrumented<ChannelStats> channel); void removeClientSocket(InternalInstrumented<SocketStats> socket); void removeListenSocket(InternalInstrumented<SocketStats> socket); void removeServerSocket(
      InternalInstrumented<ServerStats> server, InternalInstrumented<SocketStats> socket); RootChannelList getRootChannels(long fromId, int maxPageSize); @Nullable InternalInstrumented<ChannelStats> getChannel(long id); @Nullable InternalInstrumented<ChannelStats> getSubchannel(long id); ServerList getServers(long fromId, int maxPageSize); @Nullable ServerSocketsList getServerSockets(long serverId, long fromId, int maxPageSize); @Nullable InternalInstrumented<SocketStats> getSocket(long id); @VisibleForTesting boolean containsServer(InternalLogId serverRef); @VisibleForTesting boolean containsSubchannel(InternalLogId subchannelRef); InternalInstrumented<ChannelStats> getRootChannel(long id); @VisibleForTesting boolean containsClientSocket(InternalLogId transportRef); static long id(InternalWithLogId withLogId);  }