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

pl.allegro.tech.hermes.api.ConsumerGroup Maven / Gradle / Ivy

There is a newer version: 2.6.22
Show newest version
package pl.allegro.tech.hermes.api;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Objects;
import java.util.Set;

public class ConsumerGroup {

    private final String clusterName;
    private final String groupId;
    private final String state;

    private final Set members;

    @JsonCreator
    public ConsumerGroup(@JsonProperty("clusterName") String clusterName,
                         @JsonProperty("groupId") String groupId,
                         @JsonProperty("state") String state,
                         @JsonProperty("members") Set members) {
        this.clusterName = clusterName;
        this.groupId = groupId;
        this.state = state;
        this.members = members;
    }

    public String getClusterName() {
        return clusterName;
    }

    public String getGroupId() {
        return groupId;
    }

    public String getState() {
        return state;
    }

    public Set getMembers() {
        return members;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ConsumerGroup that = (ConsumerGroup) o;
        return Objects.equals(clusterName, that.clusterName)
                && Objects.equals(groupId, that.groupId)
                && Objects.equals(state, that.state)
                && Objects.equals(members, that.members);
    }

    @Override
    public int hashCode() {
        return Objects.hash(clusterName, groupId, state, members);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy