diff --git a/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ConsumerConfig.java b/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ConsumerConfig.java index 56095ae28..250d197c8 100644 --- a/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ConsumerConfig.java +++ b/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ConsumerConfig.java @@ -30,28 +30,28 @@ public class ConsumerConfig extends BaseNsrModel { /** * 开启就近机房消费 **/ - private boolean nearBy; + private Boolean nearBy; /** * 是否暂停消费 **/ - private boolean paused; + private Boolean paused; /** * 是否需要归档,默认不归档 **/ - private boolean archive; + private Boolean archive; /** * 是否启用重试服务,默认开启 **/ - private boolean retry = true; + private Boolean retry = true; /** * 延迟时间,最大延迟1小时 */ @Max(3600000) - private int delay = 0; + private Integer delay = 0; /** * 偏移量管理类型 @@ -62,56 +62,56 @@ public class ConsumerConfig extends BaseNsrModel { * 应答超时时间,默认2min */ @Min(0) - private int ackTimeout = 120000; + private Integer ackTimeout = 120000; /** * 批量大小,默认10 **/ @Min(0) @Max(127) - private int batchSize = 10; + private Integer batchSize = 10; /** * 最大重试次数(无限制) **/ @Min(0) - private int maxRetrys; + private Integer maxRetrys; /** * 最大重试间隔(默认5分钟) **/ @Min(0) - private int maxRetryDelay; + private Integer maxRetryDelay; /** * 重试间隔 */ @Min(0) - private int retryDelay; + private Integer retryDelay; private String region; /** * 指数增加间隔时间 **/ - private boolean useExponentialBackOff = true; + private Boolean useExponentialBackOff = true; /** * 指数系数 */ @Min(0) - private double backOffMultiplier; + private Double backOffMultiplier; /** * 过期时间(默认3天) **/ @Min(0) - private int expireTime; + private Integer expireTime; /** * 单队列并行度 **/ - private int concurrent = 1; + private Integer concurrent = 1; /** * 黑名单 @@ -120,14 +120,14 @@ public class ConsumerConfig extends BaseNsrModel { private String filters; - private int limitTps; + private Integer limitTps; - private int limitTraffic; + private Integer limitTraffic; private Map params; - public boolean isNearBy() { + public Boolean isNearBy() { return nearBy; } @@ -143,7 +143,7 @@ public void setConsumerId(String consumerId) { this.consumerId = consumerId; } - public boolean isPaused() { + public Boolean isPaused() { return paused; } @@ -151,7 +151,7 @@ public void setPaused(boolean paused) { this.paused = paused; } - public boolean isArchive() { + public Boolean isArchive() { return archive; } @@ -159,7 +159,7 @@ public void setArchive(boolean archive) { this.archive = archive; } - public boolean isRetry() { + public Boolean isRetry() { return retry; } @@ -167,7 +167,7 @@ public void setRetry(boolean retry) { this.retry = retry; } - public int getDelay() { + public Integer getDelay() { return delay; } @@ -175,7 +175,7 @@ public void setDelay(int delay) { this.delay = delay; } - public int getAckTimeout() { + public Integer getAckTimeout() { return ackTimeout; } @@ -183,7 +183,7 @@ public void setAckTimeout(int ackTimeout) { this.ackTimeout = ackTimeout; } - public int getBatchSize() { + public Integer getBatchSize() { return batchSize; } @@ -191,7 +191,7 @@ public void setBatchSize(int batchSize) { this.batchSize = batchSize; } - public int getMaxRetrys() { + public Integer getMaxRetrys() { return maxRetrys; } @@ -199,7 +199,7 @@ public void setMaxRetrys(int maxRetrys) { this.maxRetrys = maxRetrys; } - public int getMaxRetryDelay() { + public Integer getMaxRetryDelay() { return maxRetryDelay; } @@ -207,7 +207,7 @@ public void setMaxRetryDelay(int maxRetryDelay) { this.maxRetryDelay = maxRetryDelay; } - public int getRetryDelay() { + public Integer getRetryDelay() { return retryDelay; } @@ -215,7 +215,7 @@ public void setRetryDelay(int retryDelay) { this.retryDelay = retryDelay; } - public boolean isUseExponentialBackOff() { + public Boolean isUseExponentialBackOff() { return useExponentialBackOff; } @@ -223,7 +223,7 @@ public void setUseExponentialBackOff(boolean useExponentialBackOff) { this.useExponentialBackOff = useExponentialBackOff; } - public double getBackOffMultiplier() { + public Double getBackOffMultiplier() { return backOffMultiplier; } @@ -231,7 +231,7 @@ public void setBackOffMultiplier(double backOffMultiplier) { this.backOffMultiplier = backOffMultiplier; } - public int getExpireTime() { + public Integer getExpireTime() { return expireTime; } @@ -239,7 +239,7 @@ public void setExpireTime(int expireTime) { this.expireTime = expireTime; } - public int getConcurrent() { + public Integer getConcurrent() { return concurrent; } @@ -267,7 +267,7 @@ public void setLimitTps(int limitTps) { this.limitTps = limitTps; } - public int getLimitTps() { + public Integer getLimitTps() { return limitTps; } @@ -275,7 +275,7 @@ public void setLimitTraffic(int limitTraffic) { this.limitTraffic = limitTraffic; } - public int getLimitTraffic() { + public Integer getLimitTraffic() { return limitTraffic; } diff --git a/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ProducerConfig.java b/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ProducerConfig.java index e84b6f184..59382fe9f 100644 --- a/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ProducerConfig.java +++ b/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ProducerConfig.java @@ -28,7 +28,7 @@ public class ProducerConfig extends BaseNsrModel { /** * 是否就近发送 **/ - private boolean nearBy; + private Boolean nearBy; /** * 集群实例发送权重 @@ -38,18 +38,18 @@ public class ProducerConfig extends BaseNsrModel { /** * 是否归档 */ - private boolean archive; + private Boolean archive; /** * 单个发送者 **/ - private boolean single = false; + private Boolean single = false; private String blackList; - private int limitTps; + private Integer limitTps; - private int limitTraffic; + private Integer limitTraffic; private Integer timeout; @@ -66,7 +66,7 @@ public void setProducerId(String producerId) { this.producerId = producerId; } - public boolean isNearBy() { + public Boolean isNearBy() { return nearBy; } @@ -82,7 +82,7 @@ public void setWeight(String weight) { this.weight = weight; } - public boolean isSingle() { + public Boolean isSingle() { return single; } @@ -90,7 +90,7 @@ public void setSingle(boolean single) { this.single = single; } - public boolean isArchive() { + public Boolean isArchive() { return archive; } @@ -110,7 +110,7 @@ public void setLimitTps(int limitTps) { this.limitTps = limitTps; } - public int getLimitTps() { + public Integer getLimitTps() { return limitTps; } @@ -118,7 +118,7 @@ public void setLimitTraffic(int limitTraffic) { this.limitTraffic = limitTraffic; } - public int getLimitTraffic() { + public Integer getLimitTraffic() { return limitTraffic; } diff --git a/joyqueue-console/joyqueue-data/joyqueue-data-repository/joyqueue-data-repository-api/src/main/java/org/joyqueue/repository/BrokerGroupRelatedRepository.java b/joyqueue-console/joyqueue-data/joyqueue-data-repository/joyqueue-data-repository-api/src/main/java/org/joyqueue/repository/BrokerGroupRelatedRepository.java index 3b3db3164..995348071 100644 --- a/joyqueue-console/joyqueue-data/joyqueue-data-repository/joyqueue-data-repository-api/src/main/java/org/joyqueue/repository/BrokerGroupRelatedRepository.java +++ b/joyqueue-console/joyqueue-data/joyqueue-data-repository/joyqueue-data-repository-api/src/main/java/org/joyqueue/repository/BrokerGroupRelatedRepository.java @@ -16,10 +16,13 @@ package org.joyqueue.repository; +import org.apache.ibatis.annotations.Param; import org.joyqueue.model.domain.BrokerGroupRelated; import org.joyqueue.model.query.QBrokerGroupRelated; import org.springframework.stereotype.Repository; +import java.util.List; + /** * Created by lining on 16-11-28. */ @@ -27,4 +30,5 @@ public interface BrokerGroupRelatedRepository extends PageRepository { int updateGroupByGroupId(BrokerGroupRelated brokerGroupRelated); int deleteByGroupId(long groupId); + List findByBrokerIds(@Param("brokerIds") List brokerIds); } diff --git a/joyqueue-console/joyqueue-data/joyqueue-data-repository/joyqueue-data-repository-mybatis/src/main/resources/mapper/BrokerGroupRelated.xml b/joyqueue-console/joyqueue-data/joyqueue-data-repository/joyqueue-data-repository-mybatis/src/main/resources/mapper/BrokerGroupRelated.xml index 7031e539d..b27fc8b2c 100644 --- a/joyqueue-console/joyqueue-data/joyqueue-data-repository/joyqueue-data-repository-mybatis/src/main/resources/mapper/BrokerGroupRelated.xml +++ b/joyqueue-console/joyqueue-data/joyqueue-data-repository/joyqueue-data-repository-mybatis/src/main/resources/mapper/BrokerGroupRelated.xml @@ -54,6 +54,14 @@ WHERE b.id=#{id} + +