package com.sohu.cache.constant;

/**
 * 水平扩容结果
 * @author leifu
 * @Date 2016年12月4日
 * @Time 下午1:30:19
 */
public class HorizontalResult {

    private int status;

    private String message;

    public HorizontalResult(int status, String message) {
        this.status = status;
        this.message = message;
    }

    public static HorizontalResult checkSuccess() {
        return new HorizontalResult(1, "所有检查都成功，可以开始水平扩容了!");
    }
    
    public static HorizontalResult scaleSuccess() {
        return new HorizontalResult(1, "水平扩容已经成功开始!");
    }

    public static HorizontalResult fail(String message) {
        return new HorizontalResult(0, message);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

	@Override
	public String toString() {
		return "HorizontalResult [status=" + status + ", message=" + message + "]";
	}

}

@@ -43,16 +43,18 @@
 * %E6%B0%B4%E5%B9%B3%E6%89%A9%E5%AE%B9%E7%BB%93%E6%9E%9C
+%E6%A0%87%E8%AF%86
 %0D%0A * @au

modify comment