broker config
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user