package com.cisdi.data.caliper.gateway;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
* @className: CaliperCustomParam
* @description: caliper参数
* @author: zhang.zhipeng
* @date: 2024/9/10 17:35
*/
@Setter
@Getter
public class CaliperCustomParam implements Serializable {
    private static final long serialVersionUID = -5017472517219960138L;

    /**
     * 每个String 如 192.168.1.5:8823 形式
     */
    private List<String> serverList = new ArrayList<>();
    
    private Boolean enableHeartbeat = Boolean.FALSE;
    
    private Integer heartbeatTimeInMs = 5000;
    private Integer heartbeatMaxLostCount = 3;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

}
