pl.allegro.tech.hermes.api.ConsumerGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-api Show documentation
Show all versions of hermes-api Show documentation
Fast and reliable message broker built on top of Kafka.
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);
}
}