All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.openservices.log.request.ProjectConsumerGroupHeartBeatRequest Maven / Gradle / Ivy

There is a newer version: 0.6.115
Show newest version
package com.aliyun.openservices.log.request;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.Map;

public class ProjectConsumerGroupHeartBeatRequest extends Request {
    private static final long serialVersionUID = 723075705068277623L;
    private Map> logStoreShards;

    public ProjectConsumerGroupHeartBeatRequest(String project, String consumer, Map> logStoreShards) {
        super(project);
        this.logStoreShards = logStoreShards;
        super.SetParam("type", "heartbeat");
        super.SetParam("consumer", consumer);
    }

    public String GetRequestBody()
    {
        JSONObject obj = new JSONObject();
        obj.putAll(logStoreShards);

        JSONObject wrapper = new JSONObject();
        wrapper.put("logstores", obj);

        return wrapper.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy