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

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

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

import com.alibaba.fastjson.JSONArray;

import java.util.ArrayList;
import java.util.List;

public class ConsumerGroupHeartBeatRequest extends ConsumerGroupRequest {
    /**
     *
     */
    private static final long serialVersionUID = 7110490639104895609L;
    private List shards;

    /**
     * @param project       project name
     * @param logstore      logstore name
     * @param consumerGroup consumer group name
     * @param consumer      consumer name
     * @param shards        the shards hold by the consumer
     */
    public ConsumerGroupHeartBeatRequest(String project, String logstore, String consumerGroup, String consumer, List shards) {
        super(project, logstore);
        super.SetParam("type", "heartbeat");
        super.SetParam("consumer", consumer);
        this.shards = shards;
    }

    @Deprecated
    public List GetShards() {
        return shards;
    }

    @Deprecated
    public void SetShards(ArrayList shards) {
        this.shards = shards;
    }

    public List getShards() {
        return shards;
    }

    public void setShards(List shards) {
        this.shards = shards;
    }

    public String GetRequestBody() {
        JSONArray array = new JSONArray();
        array.addAll(shards);
        return array.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy