导航菜单

页面标题

页面副标题

SpeedCash v6.5.1482 - InternalChannelz.java 源代码

正在查看: SpeedCash v6.5.1482 应用的 InternalChannelz.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package io.grpc;

import com.facebook.gamingservices.cloudgaming.internal.SDKConstants;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import java.net.SocketAddress;
import java.security.cert.Certificate;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;

@Internal
public final class InternalChannelz {
    public static final Logger f = Logger.getLogger(InternalChannelz.class.getName());
    public static final InternalChannelz g = new InternalChannelz();
    public final ConcurrentNavigableMap<Long, InternalInstrumented<ServerStats>> a = new ConcurrentSkipListMap();
    public final ConcurrentNavigableMap<Long, InternalInstrumented<ChannelStats>> b = new ConcurrentSkipListMap();
    public final ConcurrentMap<Long, InternalInstrumented<ChannelStats>> c = new ConcurrentHashMap();
    public final ConcurrentMap<Long, InternalInstrumented<SocketStats>> d = new ConcurrentHashMap();
    public final ConcurrentMap<Long, b> e = new ConcurrentHashMap();

    @Immutable
    public static final class ChannelStats {
        public final long callsFailed;
        public final long callsStarted;
        public final long callsSucceeded;

        @Nullable
        public final ChannelTrace channelTrace;
        public final long lastCallStartedNanos;
        public final List<InternalWithLogId> sockets;
        public final ConnectivityState state;
        public final List<InternalWithLogId> subchannels;
        public final String target;

        public static final class Builder {
            public String a;
            public ConnectivityState b;
            public ChannelTrace c;
            public long d;
            public long e;
            public long f;
            public long g;
            public List<InternalWithLogId> h = Collections.emptyList();
            public List<InternalWithLogId> i = Collections.emptyList();

            public ChannelStats build() {
                return new ChannelStats(this.a, this.b, this.c, this.d, this.e, this.f, this.g, this.h, this.i);
            }

            public Builder setCallsFailed(long j) {
                this.f = j;
                return this;
            }

            public Builder setCallsStarted(long j) {
                this.d = j;
                return this;
            }

            public Builder setCallsSucceeded(long j) {
                this.e = j;
                return this;
            }

            public Builder setChannelTrace(ChannelTrace channelTrace) {
                this.c = channelTrace;
                return this;
            }

            public Builder setLastCallStartedNanos(long j) {
                this.g = j;
                return this;
            }

            public Builder setSockets(List<InternalWithLogId> list) {
                Preconditions.checkState(this.h.isEmpty());
                this.i = Collections.unmodifiableList((List) Preconditions.checkNotNull(list));
                return this;
            }

            public Builder setState(ConnectivityState connectivityState) {
                this.b = connectivityState;
                return this;
            }

            public Builder setSubchannels(List<InternalWithLogId> list) {
                Preconditions.checkState(this.i.isEmpty());
                this.h = Collections.unmodifiableList((List) Preconditions.checkNotNull(list));
                return this;
            }

            public Builder setTarget(String str) {
                this.a = str;
                return this;
            }
        }

        public ChannelStats(String str, ConnectivityState connectivityState, @Nullable ChannelTrace channelTrace, long j, long j2, long j3, long j4, List<InternalWithLogId> list, List<InternalWithLogId> list2) {
            Preconditions.checkState(list.isEmpty() || list2.isEmpty(), "channels can have subchannels only, subchannels can have either sockets OR subchannels, neither can have both");
            this.target = str;
            this.state = connectivityState;
            this.channelTrace = channelTrace;
            this.callsStarted = j;
            this.callsSucceeded = j2;
            this.callsFailed = j3;
            this.lastCallStartedNanos = j4;
            this.subchannels = (List) Preconditions.checkNotNull(list);
            this.sockets = (List) Preconditions.checkNotNull(list2);
        }
    }

    @Immutable
    public static final class ChannelTrace {
        public final long creationTimeNanos;
        public final List<Event> events;
        public final long numEventsLogged;

        public static final class Builder {
            public Long a;
            public Long b;
            public List<Event> c = Collections.emptyList();

            public ChannelTrace build() {
                Preconditions.checkNotNull(this.a, "numEventsLogged");
                Preconditions.checkNotNull(this.b, "creationTimeNanos");
                return new ChannelTrace(this.a.longValue(), this.b.longValue(), this.c);
            }

            public Builder setCreationTimeNanos(long j) {
                this.b = Long.valueOf(j);
                return this;
            }

            public Builder setEvents(List<Event> list) {
                this.c = Collections.unmodifiableList(new ArrayList(list));
                return this;
            }

            public Builder setNumEventsLogged(long j) {
                this.a = Long.valueOf(j);
                return this;
            }
        }

        @Immutable
        public static final class Event {

            @Nullable
            public final InternalWithLogId channelRef;
            public final String description;
            public final Severity severity;

            @Nullable
            public final InternalWithLogId subchannelRef;
            public final long timestampNanos;

            public static final class Builder {
                public String a;
                public Severity b;
                public Long c;
                public InternalWithLogId d;
                public InternalWithLogId e;

                public Event build() {
                    Preconditions.checkNotNull(this.a, "description");
                    Preconditions.checkNotNull(this.b, SDKConstants.PARAM_DEBUG_MESSAGE_SEVERITY);
                    Preconditions.checkNotNull(this.c, "timestampNanos");
                    Preconditions.checkState(this.d == null || this.e == null, "at least one of channelRef and subchannelRef must be null");
                    return new Event(this.a, this.b, this.c.longValue(), this.d, this.e);
                }

                public Builder setChannelRef(InternalWithLogId internalWithLogId) {
                    this.d = internalWithLogId;
                    return this;
                }

                public Builder setDescription(String str) {
                    this.a = str;
                    return this;
                }

                public Builder setSeverity(Severity severity) {
                    this.b = severity;
                    return this;
                }

                public Builder setSubchannelRef(InternalWithLogId internalWithLogId) {
                    this.e = internalWithLogId;
                    return this;
                }

                public Builder setTimestampNanos(long j) {
                    this.c = Long.valueOf(j);
                    return this;
                }
            }

            public enum Severity {
                CT_UNKNOWN,
                CT_INFO,
                CT_WARNING,
                CT_ERROR
            }

            public boolean equals(Object obj) {
                if (!(obj instanceof Event)) {
                    return false;
                }
                Event event = (Event) obj;
                return Objects.equal(this.description, event.description) && Objects.equal(this.severity, event.severity) && this.timestampNanos == event.timestampNanos && Objects.equal(this.channelRef, event.channelRef) && Objects.equal(this.subchannelRef, event.subchannelRef);
            }

            public int hashCode() {
                return Objects.hashCode(new Object[]{this.description, this.severity, Long.valueOf(this.timestampNanos), this.channelRef, this.subchannelRef});
            }

            public String toString() {
                return MoreObjects.toStringHelper(this).add("description", this.description).add(SDKConstants.PARAM_DEBUG_MESSAGE_SEVERITY, this.severity).add("timestampNanos", this.timestampNanos).add("channelRef", this.channelRef).add("subchannelRef", this.subchannelRef).toString();
            }

            public Event(String str, Severity severity, long j, @Nullable InternalWithLogId internalWithLogId, @Nullable InternalWithLogId internalWithLogId2) {
                this.description = str;
                this.severity = (Severity) Preconditions.checkNotNull(severity, SDKConstants.PARAM_DEBUG_MESSAGE_SEVERITY);
                this.timestampNanos = j;
                this.channelRef = internalWithLogId;
                this.subchannelRef = internalWithLogId2;
            }
        }

        public ChannelTrace(long j, long j2, List<Event> list) {
            this.numEventsLogged = j;
            this.creationTimeNanos = j2;
            this.events = list;
        }
    }

    public static final class OtherSecurity {

        @Nullable
        public final Object any;
        public final String name;

        public OtherSecurity(String str, @Nullable Object obj) {
            this.name = (String) Preconditions.checkNotNull(str);
            Preconditions.checkState(obj == null || obj.getClass().getName().endsWith("com.google.protobuf.Any"), "the 'any' object must be of type com.google.protobuf.Any");
            this.any = obj;
        }
    }

    public static final class RootChannelList {
        public final List<InternalInstrumented<ChannelStats>> channels;
        public final boolean end;

        public RootChannelList(List<InternalInstrumented<ChannelStats>> list, boolean z) {
            this.channels = (List) Preconditions.checkNotNull(list);
            this.end = z;
        }
    }

    public static final class ServerList {
        public final boolean end;
        public final List<InternalInstrumented<ServerStats>> servers;

        public ServerList(List<InternalInstrumented<ServerStats>> list, boolean z) {
            this.servers = (List) Preconditions.checkNotNull(list);
            this.end = z;
        }
    }

    public static final class ServerSocketsList {
        public final boolean end;
        public final List<InternalWithLogId> sockets;

        public ServerSocketsList(List<InternalWithLogId> list, boolean z) {
            this.sockets = list;
            this.end = z;
        }
    }

    @Immutable
    public static final class ServerStats {
        public final long callsFailed;
        public final long callsStarted;
        public final long callsSucceeded;
        public final long lastCallStartedNanos;
        public final List<InternalInstrumented<SocketStats>> listenSockets;

        public static final class Builder {
            public long a;
            public long b;
            public long c;
            public long d;
            public List<InternalInstrumented<SocketStats>> listenSockets = new ArrayList();

            public Builder addListenSockets(List<InternalInstrumented<SocketStats>> list) {
                Preconditions.checkNotNull(list, "listenSockets");
                Iterator<InternalInstrumented<SocketStats>> it = list.iterator();
                while (it.hasNext()) {
                    this.listenSockets.add((InternalInstrumented) Preconditions.checkNotNull(it.next(), "null listen socket"));
                }
                return this;
            }

            public ServerStats build() {
                return new ServerStats(this.a, this.b, this.c, this.d, this.listenSockets);
            }

            public Builder setCallsFailed(long j) {
                this.c = j;
                return this;
            }

            public Builder setCallsStarted(long j) {
                this.a = j;
                return this;
            }

            public Builder setCallsSucceeded(long j) {
                this.b = j;
                return this;
            }

            public Builder setLastCallStartedNanos(long j) {
                this.d = j;
                return this;
            }
        }

        public ServerStats(long j, long j2, long j3, long j4, List<InternalInstrumented<SocketStats>> list) {
            this.callsStarted = j;
            this.callsSucceeded = j2;
            this.callsFailed = j3;
            this.lastCallStartedNanos = j4;
            this.listenSockets = (List) Preconditions.checkNotNull(list);
        }
    }

    public static final class SocketOptions {

        @Nullable
        public final Integer lingerSeconds;
        public final Map<String, String> others;

        @Nullable
        public final Integer soTimeoutMillis;

        @Nullable
        public final TcpInfo tcpInfo;

        public static final class Builder {
            public final Map<String, String> a = new HashMap();
            public TcpInfo b;
            public Integer c;
            public Integer d;

            public Builder addOption(String str, String str2) {
                this.a.put(str, (String) Preconditions.checkNotNull(str2));
                return this;
            }

            public SocketOptions build() {
                return new SocketOptions(this.c, this.d, this.b, this.a);
            }

            public Builder setSocketOptionLingerSeconds(Integer num) {
                this.d = num;
                return this;
            }

            public Builder setSocketOptionTimeoutMillis(Integer num) {
                this.c = num;
                return this;
            }

            public Builder setTcpInfo(TcpInfo tcpInfo) {
                this.b = tcpInfo;
                return this;
            }

            public Builder addOption(String str, int i) {
                this.a.put(str, Integer.toString(i));
                return this;
            }

            public Builder addOption(String str, boolean z) {
                this.a.put(str, Boolean.toString(z));
                return this;
            }
        }

        public SocketOptions(@Nullable Integer num, @Nullable Integer num2, @Nullable TcpInfo tcpInfo, Map<String, String> map) {
            Preconditions.checkNotNull(map);
            this.soTimeoutMillis = num;
            this.lingerSeconds = num2;
            this.tcpInfo = tcpInfo;
            this.others = Collections.unmodifiableMap(new HashMap(map));
        }
    }

    public static final class SocketStats {

        @Nullable
        public final TransportStats data;

        @Nullable
        public final SocketAddress local;

        @Nullable
        public final SocketAddress remote;

        @Nullable
        public final Security security;
        public final SocketOptions socketOptions;

        public SocketStats(TransportStats transportStats, @Nullable SocketAddress socketAddress, @Nullable SocketAddress socketAddress2, SocketOptions socketOptions, Security security) {
            this.data = transportStats;
            this.local = (SocketAddress) Preconditions.checkNotNull(socketAddress, "local socket");
            this.remote = socketAddress2;
            this.socketOptions = (SocketOptions) Preconditions.checkNotNull(socketOptions);
            this.security = security;
        }
    }

    public static final class TcpInfo {
        public final int advmss;
        public final int ato;
        public final int backoff;
        public final int caState;
        public final int fackets;
        public final int lastAckRecv;
        public final int lastAckSent;
        public final int lastDataRecv;
        public final int lastDataSent;
        public final int lost;
        public final int options;
        public final int pmtu;
        public final int probes;
        public final int rcvMss;
        public final int rcvSsthresh;
        public final int rcvWscale;
        public final int reordering;
        public final int retrans;
        public final int retransmits;
        public final int rto;
        public final int rtt;
        public final int rttvar;
        public final int sacked;
        public final int sndCwnd;
        public final int sndMss;
        public final int sndSsthresh;
        public final int sndWscale;
        public final int state;
        public final int unacked;

        public static final class Builder {
            public int A;
            public int B;
            public int C;
            public int a;
            public int b;
            public int c;
            public int d;
            public int e;
            public int f;
            public int g;
            public int h;
            public int i;
            public int j;
            public int k;
            public int l;
            public int m;
            public int n;
            public int o;
            public int p;
            public int q;
            public int r;
            public int s;
            public int t;
            public int u;
            public int v;
            public int w;
            public int x;
            public int y;
            public int z;

            public TcpInfo build() {
                return new TcpInfo(this.a, this.b, this.c, this.d, this.e, this.f, this.g, this.h, this.i, this.j, this.k, this.l, this.m, this.n, this.o, this.p, this.q, this.r, this.s, this.t, this.u, this.v, this.w, this.x, this.y, this.z, this.A, this.B, this.C);
            }

            public Builder setAdvmss(int i) {
                this.B = i;
                return this;
            }

            public Builder setAto(int i) {
                this.j = i;
                return this;
            }

            public Builder setBackoff(int i) {
                this.e = i;
                return this;
            }

            public Builder setCaState(int i) {
                this.b = i;
                return this;
            }

            public Builder setFackets(int i) {
                this.q = i;
                return this;
            }

            public Builder setLastAckRecv(int i) {
                this.u = i;
                return this;
            }

            public Builder setLastAckSent(int i) {
                this.s = i;
                return this;
            }

            public Builder setLastDataRecv(int i) {
                this.t = i;
                return this;
            }

            public Builder setLastDataSent(int i) {
                this.r = i;
                return this;
            }

            public Builder setLost(int i) {
                this.o = i;
                return this;
            }

            public Builder setOptions(int i) {
                this.f = i;
                return this;
            }

            public Builder setPmtu(int i) {
                this.v = i;
                return this;
            }

            public Builder setProbes(int i) {
                this.d = i;
                return this;
            }

            public Builder setRcvMss(int i) {
                this.l = i;
                return this;
            }

            public Builder setRcvSsthresh(int i) {
                this.w = i;
                return this;
            }

            public Builder setRcvWscale(int i) {
                this.h = i;
                return this;
            }

            public Builder setReordering(int i) {
                this.C = i;
                return this;
            }

            public Builder setRetrans(int i) {
                this.p = i;
                return this;
            }

            public Builder setRetransmits(int i) {
                this.c = i;
                return this;
            }

            public Builder setRto(int i) {
                this.i = i;
                return this;
            }

            public Builder setRtt(int i) {
                this.x = i;
                return this;
            }

            public Builder setRttvar(int i) {
                this.y = i;
                return this;
            }

            public Builder setSacked(int i) {
                this.n = i;
                return this;
            }

            public Builder setSndCwnd(int i) {
                this.A = i;
                return this;
            }

            public Builder setSndMss(int i) {
                this.k = i;
                return this;
            }

            public Builder setSndSsthresh(int i) {
                this.z = i;
                return this;
            }

            public Builder setSndWscale(int i) {
                this.g = i;
                return this;
            }

            public Builder setState(int i) {
                this.a = i;
                return this;
            }

            public Builder setUnacked(int i) {
                this.m = i;
                return this;
            }
        }

        public TcpInfo(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14, int i15, int i16, int i17, int i18, int i19, int i20, int i21, int i22, int i23, int i24, int i25, int i26, int i27, int i28, int i29) {
            this.state = i;
            this.caState = i2;
            this.retransmits = i3;
            this.probes = i4;
            this.backoff = i5;
            this.options = i6;
            this.sndWscale = i7;
            this.rcvWscale = i8;
            this.rto = i9;
            this.ato = i10;
            this.sndMss = i11;
            this.rcvMss = i12;
            this.unacked = i13;
            this.sacked = i14;
            this.lost = i15;
            this.retrans = i16;
            this.fackets = i17;
            this.lastDataSent = i18;
            this.lastAckSent = i19;
            this.lastDataRecv = i20;
            this.lastAckRecv = i21;
            this.pmtu = i22;
            this.rcvSsthresh = i23;
            this.rtt = i24;
            this.rttvar = i25;
            this.sndSsthresh = i26;
            this.sndCwnd = i27;
            this.advmss = i28;
            this.reordering = i29;
        }
    }

    @Immutable
    public static final class TransportStats {
        public final long keepAlivesSent;
        public final long lastLocalStreamCreatedTimeNanos;
        public final long lastMessageReceivedTimeNanos;
        public final long lastMessageSentTimeNanos;
        public final long lastRemoteStreamCreatedTimeNanos;
        public final long localFlowControlWindow;
        public final long messagesReceived;
        public final long messagesSent;
        public final long remoteFlowControlWindow;
        public final long streamsFailed;
        public final long streamsStarted;
        public final long streamsSucceeded;

        public TransportStats(long j, long j2, long j3, long j4, long j5, long j6, long j7, long j8, long j9, long j10, long j11, long j12) {
            this.streamsStarted = j;
            this.lastLocalStreamCreatedTimeNanos = j2;
            this.lastRemoteStreamCreatedTimeNanos = j3;
            this.streamsSucceeded = j4;
            this.streamsFailed = j5;
            this.messagesSent = j6;
            this.messagesReceived = j7;
            this.keepAlivesSent = j8;
            this.lastMessageSentTimeNanos = j9;
            this.lastMessageReceivedTimeNanos = j10;
            this.localFlowControlWindow = j11;
            this.remoteFlowControlWindow = j12;
        }
    }

    public static final class b extends ConcurrentSkipListMap<Long, InternalInstrumented<SocketStats>> {
        private static final long serialVersionUID = -7883772124944661414L;

        public b() {
        }
    }

    @VisibleForTesting
    public InternalChannelz() {
    }

    public static <T extends InternalInstrumented<?>> void b(Map<Long, T> map, T t) {
        map.put(Long.valueOf(t.getLogId().getId()), t);
    }

    public static <T extends InternalInstrumented<?>> boolean c(Map<Long, T> map, InternalLogId internalLogId) {
        return map.containsKey(Long.valueOf(internalLogId.getId()));
    }

    public static <T extends InternalInstrumented<?>> void e(Map<Long, T> map, T t) {
        map.remove(Long.valueOf(id(t)));
    }

    public static long id(InternalWithLogId internalWithLogId) {
        return internalWithLogId.getLogId().getId();
    }

    public static InternalChannelz instance() {
        return g;
    }

    public void addClientSocket(InternalInstrumented<SocketStats> internalInstrumented) {
        b(this.d, internalInstrumented);
    }

    public void addListenSocket(InternalInstrumented<SocketStats> internalInstrumented) {
        b(this.d, internalInstrumented);
    }

    public void addRootChannel(InternalInstrumented<ChannelStats> internalInstrumented) {
        b(this.b, internalInstrumented);
    }

    public void addServer(InternalInstrumented<ServerStats> internalInstrumented) {
        this.e.put(Long.valueOf(id(internalInstrumented)), new b());
        b(this.a, internalInstrumented);
    }

    public void addServerSocket(InternalInstrumented<ServerStats> internalInstrumented, InternalInstrumented<SocketStats> internalInstrumented2) {
        b(this.e.get(Long.valueOf(id(internalInstrumented))), internalInstrumented2);
    }

    public void addSubchannel(InternalInstrumented<ChannelStats> internalInstrumented) {
        b(this.c, internalInstrumented);
    }

    @VisibleForTesting
    public boolean containsClientSocket(InternalLogId internalLogId) {
        return c(this.d, internalLogId);
    }

    @VisibleForTesting
    public boolean containsServer(InternalLogId internalLogId) {
        return c(this.a, internalLogId);
    }

    @VisibleForTesting
    public boolean containsSubchannel(InternalLogId internalLogId) {
        return c(this.c, internalLogId);
    }

    public final InternalInstrumented<SocketStats> d(long j) {
        Iterator<b> it = this.e.values().iterator();
        while (it.hasNext()) {
            InternalInstrumented<SocketStats> internalInstrumented = it.next().get(Long.valueOf(j));
            if (internalInstrumented != null) {
                return internalInstrumented;
            }
        }
        return null;
    }

    @Nullable
    public InternalInstrumented<ChannelStats> getChannel(long j) {
        return this.b.get(Long.valueOf(j));
    }

    public InternalInstrumented<ChannelStats> getRootChannel(long j) {
        return this.b.get(Long.valueOf(j));
    }

    public RootChannelList getRootChannels(long j, int i) {
        ArrayList arrayList = new ArrayList();
        Iterator<InternalInstrumented<ChannelStats>> it = this.b.tailMap((ConcurrentNavigableMap<Long, InternalInstrumented<ChannelStats>>) Long.valueOf(j)).values().iterator();
        while (it.hasNext() && arrayList.size() < i) {
            arrayList.add(it.next());
        }
        return new RootChannelList(arrayList, !it.hasNext());
    }

    @Nullable
    public InternalInstrumented<ServerStats> getServer(long j) {
        return this.a.get(Long.valueOf(j));
    }

    @Nullable
    public ServerSocketsList getServerSockets(long j, long j2, int i) {
        b bVar = this.e.get(Long.valueOf(j));
        if (bVar == null) {
            return null;
        }
        ArrayList arrayList = new ArrayList(i);
        Iterator<InternalInstrumented<SocketStats>> it = bVar.tailMap((b) Long.valueOf(j2)).values().iterator();
        while (arrayList.size() < i && it.hasNext()) {
            arrayList.add(it.next());
        }
        return new ServerSocketsList(arrayList, !it.hasNext());
    }

    public ServerList getServers(long j, int i) {
        ArrayList arrayList = new ArrayList(i);
        Iterator<InternalInstrumented<ServerStats>> it = this.a.tailMap((ConcurrentNavigableMap<Long, InternalInstrumented<ServerStats>>) Long.valueOf(j)).values().iterator();
        while (it.hasNext() && arrayList.size() < i) {
            arrayList.add(it.next());
        }
        return new ServerList(arrayList, !it.hasNext());
    }

    @Nullable
    public InternalInstrumented<SocketStats> getSocket(long j) {
        InternalInstrumented<SocketStats> internalInstrumented = this.d.get(Long.valueOf(j));
        return internalInstrumented != null ? internalInstrumented : d(j);
    }

    @Nullable
    public InternalInstrumented<ChannelStats> getSubchannel(long j) {
        return this.c.get(Long.valueOf(j));
    }

    public void removeClientSocket(InternalInstrumented<SocketStats> internalInstrumented) {
        e(this.d, internalInstrumented);
    }

    public void removeListenSocket(InternalInstrumented<SocketStats> internalInstrumented) {
        e(this.d, internalInstrumented);
    }

    public void removeRootChannel(InternalInstrumented<ChannelStats> internalInstrumented) {
        e(this.b, internalInstrumented);
    }

    public void removeServer(InternalInstrumented<ServerStats> internalInstrumented) {
        e(this.a, internalInstrumented);
        this.e.remove(Long.valueOf(id(internalInstrumented)));
    }

    public void removeServerSocket(InternalInstrumented<ServerStats> internalInstrumented, InternalInstrumented<SocketStats> internalInstrumented2) {
        e(this.e.get(Long.valueOf(id(internalInstrumented))), internalInstrumented2);
    }

    public void removeSubchannel(InternalInstrumented<ChannelStats> internalInstrumented) {
        e(this.c, internalInstrumented);
    }

    public static final class Security {

        @Nullable
        public final OtherSecurity other;

        @Nullable
        public final Tls tls;

        public Security(Tls tls) {
            this.tls = (Tls) Preconditions.checkNotNull(tls);
            this.other = null;
        }

        public Security(OtherSecurity otherSecurity) {
            this.tls = null;
            this.other = (OtherSecurity) Preconditions.checkNotNull(otherSecurity);
        }
    }

    @Immutable
    public static final class Tls {
        public final String cipherSuiteStandardName;

        @Nullable
        public final Certificate localCert;

        @Nullable
        public final Certificate remoteCert;

        public Tls(String str, Certificate certificate, Certificate certificate2) {
            this.cipherSuiteStandardName = str;
            this.localCert = certificate;
            this.remoteCert = certificate2;
        }

        public Tls(SSLSession sSLSession) {
            String cipherSuite = sSLSession.getCipherSuite();
            Certificate[] localCertificates = sSLSession.getLocalCertificates();
            Certificate certificate = null;
            Certificate certificate2 = localCertificates != null ? localCertificates[0] : null;
            try {
                Certificate[] peerCertificates = sSLSession.getPeerCertificates();
                if (peerCertificates != null) {
                    certificate = peerCertificates[0];
                }
            } catch (SSLPeerUnverifiedException e) {
                InternalChannelz.f.log(Level.FINE, String.format("Peer cert not available for peerHost=%s", sSLSession.getPeerHost()), (Throwable) e);
            }
            this.cipherSuiteStandardName = cipherSuite;
            this.localCert = certificate2;
            this.remoteCert = certificate;
        }
    }
}