-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,139 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
nacossync-worker/src/main/java/com/alibaba/nacossync/constant/ShardingLogTypeEnum.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.alibaba.nacossync.constant; | ||
|
||
/** | ||
* Created by maj on 2020/11/18. | ||
*/ | ||
public enum ShardingLogTypeEnum { | ||
|
||
ADD("add", "新增"), | ||
|
||
DELETE("DELETE", "删除"); | ||
|
||
private String type; | ||
private String desc; | ||
|
||
ShardingLogTypeEnum(String type, String desc) { | ||
this.type = type; | ||
this.desc = desc; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getDesc() { | ||
return desc; | ||
} | ||
|
||
public void setDesc(String desc) { | ||
this.desc = desc; | ||
} | ||
|
||
public static boolean contains(String type) { | ||
|
||
for (ShardingLogTypeEnum shardingLogTypeEnum : ShardingLogTypeEnum.values()) { | ||
|
||
if (shardingLogTypeEnum.getType().equals(type)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.