<commit_before>package com.mpush.zk;


import com.mpush.tools.MPushUtil;
import com.mpush.tools.config.ConfigCenter;

/**
 * 系统配置
 */
public class ZKServerNode {

    private String ip;

    private int port;

    private String extranetIp;

    private transient String zkPath;

    public ZKServerNode() {
    }

    public ZKServerNode(String ip, int port, String extranetIp, String zkPath) {
        this.ip = ip;
        this.port = port;
        this.extranetIp = extranetIp;
        this.zkPath = zkPath;
    }

    public static ZKServerNode csNode() {
        return new ZKServerNode(MPushUtil.getLocalIp(),
                ConfigCenter.I.connectionServerPort(),
                MPushUtil.getExtranetAddress(),
                ZKPath.CONNECTION_SERVER.getWatchPath());
    }

    public static ZKServerNode gsNode() {
        return new ZKServerNode(MPushUtil.getLocalIp(),
                ConfigCenter.I.gatewayServerPort(),
                null,
                ZKPath.GATEWAY_SERVER.getWatchPath());
    }

    public String getIp() {
        return ip;
    }

    public ZKServerNode setIp(String ip) {
        this.ip = ip;
        return this;
    }

    public int getPort() {
        return port;
    }

    public ZKServerNode setPort(int port) {
        this.port = port;
        return this;
    }

    public String getExtranetIp() {
        return extranetIp;<commit_msg>gateway server add extranet ip address<commit_after>package com.mpush.zk;


import com.mpush.tools.MPushUtil;
import com.mpush.tools.config.ConfigCenter;

/**
 * 系统配置
 */
public class ZKServerNode {

    private String ip;

    private int port;

    private String extranetIp;

    private transient String zkPath;

    public ZKServerNode() {
    }

    public ZKServerNode(String ip, int port, String extranetIp, String zkPath) {
        this.ip = ip;
        this.port = port;
        this.extranetIp = extranetIp;
        this.zkPath = zkPath;
    }

    public static ZKServerNode csNode() {
        return new ZKServerNode(MPushUtil.getLocalIp(),
                ConfigCenter.I.connectionServerPort(),
                MPushUtil.getExtranetAddress(),
                ZKPath.CONNECTION_SERVER.getWatchPath());
    }

    public static ZKServerNode gsNode() {
        return new ZKServerNode(MPushUtil.getLocalIp(),
                ConfigCenter.I.gatewayServerPort(),
                MPushUtil.getExtranetAddress(),
                ZKPath.GATEWAY_SERVER.getWatchPath());
    }

    public String getIp() {
        return ip;
    }

    public ZKServerNode setIp(String ip) {
        this.ip = ip;
        return this;
    }

    public int getPort() {
        return port;
    }

    public ZKServerNode setPort(int port) {
        this.port = port;
        return this;
    }

    public String getExtranetIp() {
        return extranetIp;
{'fraction_non_alphanumeric': 0.0884737398660557, 'fraction_numerical': 0.0, 'mean_word_length': 2.1359116022099447, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3627718', 'n_tokens_mistral': 908, 'n_tokens_neox': 863, 'n_words': 190}