public static int scoreAddr()

in tchannel-core/src/main/java/com/uber/tchannel/utils/TChannelUtilities.java [46:65]


    public static int scoreAddr(@NotNull NetworkInterface iface, @NotNull InetAddress addr) {
        int score = 0;

        if (addr instanceof Inet4Address) {
            score += 300;
        }

        try {
            if (!iface.isLoopback() && !addr.isLoopbackAddress()) {
                score += 100;
                if (iface.isUp()) {
                    score += 100;
                }
            }
        } catch (SocketException e) {
            logger.error("Unable to score IP {} of interface {}", addr, iface, e);
        }

        return score;
    }