com.aliyun.openservices.log.response.ProjectConsumerGroupHeartBeatResponse Maven / Gradle / Ivy
package com.aliyun.openservices.log.response;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
public class ProjectConsumerGroupHeartBeatResponse extends Response {
private static final long serialVersionUID = 3558359690750583972L;
private Map> logStoreShards;
public ProjectConsumerGroupHeartBeatResponse(Map headers, JSONObject obj) {
super(headers);
logStoreShards = new HashMap>();
JSONObject logStoreShardsMap = obj.getJSONObject("logstores");
for (String logStore : logStoreShardsMap.keySet()) {
JSONArray shardJsonArray = logStoreShardsMap.getJSONArray(logStore);
List shardList = new ArrayList();
for (int i = 0; i < shardJsonArray.size(); ++i) {
shardList.add(shardJsonArray.getIntValue(i));
}
this.logStoreShards.put(logStore, shardList);
}
}
/**
* @return the shards consumer should held in time
*/
public Map> getLogStoreShards() {
return logStoreShards;
}
public void setLogStoreShards(Map> logStoreShards) {
this.logStoreShards = logStoreShards;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy