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 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 getListenerClass() { return this.listenerClass; } public void setListenerClass(Map 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; } }