int size() {
        int size = 0;
        synchronized (sessionsByHostAndPort) {
            for (List<NativeSslSession> sessions : sessionsByHostAndPort.values()) {
                size += sessions.size();
            }
        }
        return size;
    }
Gets the suitable session reference from the session cache container.
common/src/main/java/org/conscrypt/ClientSessionContext.java