-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[collect]Add redis cluster auto-discovery display metrics information (…
…#685) [collect]Add redis cluster auto-discovery display metrics information [collect]review application.yml --------- Co-authored-by: hudongdong <[email protected]>
- Loading branch information
1 parent
8870638
commit 05c87c0
Showing
5 changed files
with
152 additions
and
23 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
21 changes: 21 additions & 0 deletions
21
common/src/main/java/com/usthe/common/util/MapCapUtil.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,21 @@ | ||
package com.usthe.common.util; | ||
|
||
/** | ||
* map initial capacity calculation | ||
* | ||
* @create: 2023/03/04 | ||
*/ | ||
public class MapCapUtil { | ||
|
||
|
||
private static final float LOAD_FACTOR = 0.75f; | ||
|
||
/** | ||
* Prevent expansion | ||
* @param size | ||
* @return | ||
*/ | ||
public static int calInitMap(int size) { | ||
return (int) Math.ceil (size / LOAD_FACTOR); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
common/src/main/java/com/usthe/common/util/SignConstants.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,18 @@ | ||
package com.usthe.common.util; | ||
|
||
/** | ||
* 特殊服务常量 | ||
* | ||
* @create: 2023/03/04 | ||
*/ | ||
public interface SignConstants { | ||
|
||
String DOUBLE_MARK = ":"; | ||
|
||
String WELL_NO = "#"; | ||
|
||
|
||
String LINE_FEED = "\n"; | ||
|
||
String CARRIAGE_RETURN = "\r"; | ||
} |
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