修改GroupOffsetResetEnum类名为OffsetTypeEnum

This commit is contained in:
zengqiao
2022-09-19 13:55:59 +08:00
parent 0bf85c97b5
commit 375c6f56c9
5 changed files with 24 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ package com.xiaojukeji.know.streaming.km.common.bean.dto.group;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.xiaojukeji.know.streaming.km.common.bean.dto.partition.PartitionOffsetDTO;
import com.xiaojukeji.know.streaming.km.common.bean.dto.topic.ClusterTopicDTO;
import com.xiaojukeji.know.streaming.km.common.enums.OffsetTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -23,7 +24,7 @@ public class GroupOffsetResetDTO extends ClusterTopicDTO {
private String groupName;
/**
* @see com.xiaojukeji.know.streaming.km.common.enums.GroupOffsetResetEnum
* @see OffsetTypeEnum
*/
@NotNull(message = "resetType不允许为空")
@ApiModelProperty(value = "重置方式", example = "1")

View File

@@ -1,8 +1,8 @@
package com.xiaojukeji.know.streaming.km.common.bean.dto.topic;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.xiaojukeji.know.streaming.km.common.bean.dto.BaseDTO;
import com.xiaojukeji.know.streaming.km.common.bean.dto.pagination.PaginationSortDTO;
import com.xiaojukeji.know.streaming.km.common.enums.OffsetTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -36,13 +36,12 @@ public class TopicRecordDTO extends PaginationSortDTO {
@ApiModelProperty(value = "预览超时时间", example = "10000")
private Long pullTimeoutUnitMs = 8000L;
/**
* @see OffsetTypeEnum
*/
@ApiModelProperty(value = "offset", example = "")
private Integer filterOffsetReset = 0;
@ApiModelProperty(value = "开始日期时间戳", example = "")
private Long startTimestampUnitMs;
@ApiModelProperty(value = "结束日期时间戳", example = "")
private Long utilTimestampUnitMs;
}

View File

@@ -3,19 +3,19 @@ package com.xiaojukeji.know.streaming.km.common.enums;
import lombok.Getter;
/**
* 重置offset
* offset类型
* @author zengqiao
* @date 19/4/8
*/
@Getter
public enum GroupOffsetResetEnum {
LATEST(0, "重置到最新"),
public enum OffsetTypeEnum {
LATEST(0, "最新"),
EARLIEST(1, "重置到最旧"),
EARLIEST(1, "最旧"),
PRECISE_TIMESTAMP(2, "按时间进行重置"),
PRECISE_TIMESTAMP(2, "指定时间"),
PRECISE_OFFSET(3, "重置到指定位置"),
PRECISE_OFFSET(3, "指定位置"),
;
@@ -23,7 +23,7 @@ public enum GroupOffsetResetEnum {
private final String message;
GroupOffsetResetEnum(int resetType, String message) {
OffsetTypeEnum(int resetType, String message) {
this.resetType = resetType;
this.message = message;
}