org.zodiac.rocketmq.client.config.SwimlaneInfo Maven / Gradle / Ivy
The newest version!
package org.zodiac.rocketmq.client.config;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import org.zodiac.rocketmq.client.config.properties.CustomizedConsumeWhiteList;
/**
* 泳道配置。
*
*/
public class SwimlaneInfo {
/*是否启用泳道*/
private boolean enabled = true;
/*互斥消费白名单*/
private List customizedConsumeWhiteLists = new ArrayList<>();
private int describeConsumerGroupsMillis = 10_000;
/*检查group超时毫秒数*/
private long detectTimeoutMillis = 10_000L;
public SwimlaneInfo() {
}
public boolean isEnabled() {
return enabled;
}
public SwimlaneInfo setEnabled(boolean enabled) {
this.enabled = enabled;
return this;
}
public List getCustomizedConsumeWhiteLists() {
return customizedConsumeWhiteLists;
}
public SwimlaneInfo setCustomizedConsumeWhiteLists(List customizedConsumeWhiteLists) {
this.customizedConsumeWhiteLists = customizedConsumeWhiteLists;
return this;
}
public int getDescribeConsumerGroupsMillis() {
return describeConsumerGroupsMillis;
}
public SwimlaneInfo setDescribeConsumerGroupsMillis(int describeConsumerGroupsMillis) {
this.describeConsumerGroupsMillis = describeConsumerGroupsMillis;
return this;
}
public long getDetectTimeoutMillis() {
return detectTimeoutMillis;
}
public SwimlaneInfo setDetectTimeoutMillis(long detectTimeoutMillis) {
this.detectTimeoutMillis = detectTimeoutMillis;
return this;
}
@Override
public int hashCode() {
return Objects.hash(customizedConsumeWhiteLists, describeConsumerGroupsMillis, detectTimeoutMillis, enabled);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
SwimlaneInfo other = (SwimlaneInfo)obj;
return Objects.equals(customizedConsumeWhiteLists, other.customizedConsumeWhiteLists)
&& describeConsumerGroupsMillis == other.describeConsumerGroupsMillis
&& detectTimeoutMillis == other.detectTimeoutMillis && enabled == other.enabled;
}
@Override
public String toString() {
return "[enabled=" + enabled + ", customizedConsumeWhiteLists=" + customizedConsumeWhiteLists
+ ", describeConsumerGroupsMillis=" + describeConsumerGroupsMillis + ", detectTimeoutMillis="
+ detectTimeoutMillis + "]";
}
}