broker config

This commit is contained in:
许晓东
2021-11-04 16:50:20 +08:00
parent 2c2558d157
commit 2f2ee7f901
11 changed files with 345 additions and 37 deletions

View File

@@ -0,0 +1,24 @@
package com.xuxd.kafka.console.beans.dto;
import lombok.Data;
import org.apache.kafka.clients.admin.ConfigEntry;
/**
* kafka-console-ui.
*
* @author xuxd
* @date 2021-11-04 15:39:07
**/
@Data
public class AlterConfigDTO {
private String entity;
private String name;
private String value;
public ConfigEntry to() {
return new ConfigEntry(name, value);
}
}

View File

@@ -0,0 +1,11 @@
package com.xuxd.kafka.console.beans.enums;
/**
* kafka-console-ui.
*
* @author xuxd
* @date 2021-11-04 15:36:09
**/
public enum AlterType {
SET,DELETE
}

View File

@@ -50,13 +50,14 @@ public class ConfigEntryVO implements Comparable {
ConfigEntryVO that = (ConfigEntryVO) o;
if (!this.source.equals(that.source)) {
return ORDER_DICTIONARY.get(this.source) - ORDER_DICTIONARY.get(that.source);
}
if (this.readOnly != that.readOnly) {
return this.readOnly ? 1 : -1;
}
if (!this.source.equals(that.source)) {
return ORDER_DICTIONARY.get(this.source) - ORDER_DICTIONARY.get(that.source);
}
return this.name.compareTo(that.name);
}
}