package com.ctrip.hermes.metaserver.commons;

import java.util.Map;

import org.unidal.tuple.Pair;

import com.ctrip.hermes.core.bo.HostPort;
import com.ctrip.hermes.core.bo.Tpg;

public class MetaStatusStatusResponse {
	private Boolean leader;

	private HostPort leaderInfo;

	private Map<String, Assignment<Integer>> brokerAssignments;

	private Map<Pair<String, Integer>, Map<String, ClientLeaseInfo>> brokerLeases;

	private Map<Tpg, Map<String, ClientLeaseInfo>> consumerLeases;

	private Assignment<String> metaServerAssignments;

	public Boolean isLeader() {
		return leader;
	}

	public void setLeader(Boolean leader) {
		this.leader = leader;
	}

	public Map<String, Assignment<Integer>> getBrokerAssignments() {
		return brokerAssignments;
	}

	public void setBrokerAssignments(Map<String, Assignment<Integer>> brokerAssignments) {
		this.brokerAssignments = brokerAssignments;
	}

	public Map<Pair<String, Integer>, Map<String, ClientLeaseInfo>> getBrokerLeases() {
		return brokerLeases;
	}

	public void setBrokerLeases(Map<Pair<String, Integer>, Map<String, ClientLeaseInfo>> brokerLeases) {
		this.brokerLeases = brokerLeases;
	}

	public Map<Tpg, Map<String, ClientLeaseInfo>> getConsumerLeases() {
		return consumerLeases;
	}

	public void setConsumerLeases(Map<Tpg, Map<String, ClientLeaseInfo>> consumerLeases) {
		this.consumerLeases = consumerLeases;
	}

	public HostPort getLeaderInfo() {
		return leaderInfo;
	}

	public void setLeaderInfo(HostPort leaderInfo) {
		this.leaderInfo = leaderInfo;
	}

	public Assignment<String> getMetaServerAssignments() {
		return metaServerAssignments;
	}

	public void setMetaServerAssignments(Assignment<String> metaServerAssignments) {
		this.metaServerAssignments = metaServerAssignments;
	}
}
@@ -530,16 +530,94 @@
 ments;%0A%0A
+%09private Map%3CPair%3CString, String%3E, Assignment%3CInteger%3E%3E consumerAssignments;%0A%0A
 %09public 
@@ -1823,10 +1823,286 @@
 ents;%0A%09%7D
+%0A%0A%09public void setConsumerAssignments(Map%3CPair%3CString, String%3E, Assignment%3CInteger%3E%3E consumerAssignments) %7B%0A%09%09this.consumerAssignments = consumerAssignments;%0A%09%7D%0A%0A%09public Map%3CPair%3CString, String%3E, Assignment%3CInteger%3E%3E getConsumerAssignments() %7B%0A%09%09return consumerAssignments;%0A%09%7D
 %0A%7D

add consumer assignments into status page