mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
dee355b4a7
- artifacts/decompiled 树与相关源码变更 - maven-cw-elevator-application 业务 docs 与 package-info - scripts 下 formatter 校验与辅助脚本 - 其他子工程/接口与发布线一并纳入版本控制 Made-with: Cursor Former-commit-id: e102e8cab64e575bcd23c9a66a598aa1892bb492
128 lines
2.2 KiB
Java
128 lines
2.2 KiB
Java
package cn.cloudwalk.event.autoconfig;
|
|
|
|
import java.util.Map;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ConfigurationProperties(prefix = "cloudwalk.event")
|
|
public class EventProperties
|
|
{
|
|
protected static final String CONF_PREFIX = "cloudwalk.event";
|
|
private String bootstrapServers;
|
|
private String groupId;
|
|
private Map<String, String> listenerClass;
|
|
private Integer fetchDataWorkerNumber;
|
|
private String workerNamePrefix;
|
|
private HandlerExecutorConfig handlerExecutorConfig = new HandlerExecutorConfig(Integer.valueOf(5), Integer.valueOf(10));
|
|
|
|
public static class HandlerExecutorConfig
|
|
{
|
|
private Integer corePoolSize;
|
|
private Integer maximumPoolSize;
|
|
|
|
public HandlerExecutorConfig(Integer corePoolSize, Integer maximumPoolSize) {
|
|
this.corePoolSize = corePoolSize;
|
|
this.maximumPoolSize = maximumPoolSize;
|
|
}
|
|
|
|
public Integer getCorePoolSize() {
|
|
return this.corePoolSize;
|
|
}
|
|
|
|
public void setCorePoolSize(Integer corePoolSize) {
|
|
this.corePoolSize = corePoolSize;
|
|
}
|
|
|
|
public Integer getMaximumPoolSize() {
|
|
return this.maximumPoolSize;
|
|
}
|
|
|
|
public void setMaximumPoolSize(Integer maximumPoolSize) {
|
|
this.maximumPoolSize = maximumPoolSize;
|
|
}
|
|
}
|
|
|
|
public String getBootstrapServers() {
|
|
return this.bootstrapServers;
|
|
}
|
|
|
|
public void setBootstrapServers(String bootstrapServers) {
|
|
this.bootstrapServers = bootstrapServers;
|
|
}
|
|
|
|
public String getGroupId() {
|
|
return this.groupId;
|
|
}
|
|
|
|
public void setGroupId(String groupId) {
|
|
this.groupId = groupId;
|
|
}
|
|
|
|
public Map<String, String> getListenerClass() {
|
|
return this.listenerClass;
|
|
}
|
|
|
|
public void setListenerClass(Map<String, String> listenerClass) {
|
|
this.listenerClass = listenerClass;
|
|
}
|
|
|
|
public Integer getFetchDataWorkerNumber() {
|
|
return this.fetchDataWorkerNumber;
|
|
}
|
|
|
|
public void setFetchDataWorkerNumber(Integer fetchDataWorkerNumber) {
|
|
this.fetchDataWorkerNumber = fetchDataWorkerNumber;
|
|
}
|
|
|
|
public HandlerExecutorConfig getHandlerExecutorConfig() {
|
|
return this.handlerExecutorConfig;
|
|
}
|
|
|
|
public void setHandlerExecutorConfig(HandlerExecutorConfig handlerExecutorConfig) {
|
|
this.handlerExecutorConfig = handlerExecutorConfig;
|
|
}
|
|
|
|
public String getWorkerNamePrefix() {
|
|
return this.workerNamePrefix;
|
|
}
|
|
|
|
public void setWorkerNamePrefix(String workerNamePrefix) {
|
|
this.workerNamePrefix = workerNamePrefix;
|
|
}
|
|
}
|
|
|
|
|