Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YZG
yzg-util
Commits
78f3d1cd
Commit
78f3d1cd
authored
May 19, 2022
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将源码打包进jar包
parent
35ebe843
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
PlanLevelNamespaceProgram.java
...om.yanzuoguang.redis/level/PlanLevelNamespaceProgram.java
+14
-5
No files found.
yzg-util-redis/src/main/java/com.yanzuoguang.redis/level/PlanLevelNamespaceProgram.java
View file @
78f3d1cd
...
...
@@ -2,11 +2,9 @@ package com.yanzuoguang.redis.level;
import
com.yanzuoguang.redis.PlanLevelNamespaceDefault
;
import
com.yanzuoguang.redis.vo.PlanLevelType
;
import
com.yanzuoguang.util.helper.StringHelper
;
import
org.springframework.stereotype.Component
;
import
java.lang.management.ManagementFactory
;
import
java.lang.management.RuntimeMXBean
;
/**
* 程序级别
*
...
...
@@ -14,10 +12,21 @@ import java.lang.management.RuntimeMXBean;
*/
@Component
public
class
PlanLevelNamespaceProgram
implements
PlanLevelNamespaceDefault
{
private
final
PlanLevelNamespaceServerIp
planLevelNamespaceServerIp
;
private
final
PlanLevelNamespaceApplication
planLevelNamespaceApplication
;
public
PlanLevelNamespaceProgram
(
PlanLevelNamespaceServerIp
planLevelNamespaceServerIp
,
PlanLevelNamespaceApplication
planLevelNamespaceApplication
)
{
this
.
planLevelNamespaceServerIp
=
planLevelNamespaceServerIp
;
this
.
planLevelNamespaceApplication
=
planLevelNamespaceApplication
;
}
@Override
public
String
getLevelNamespace
()
{
RuntimeMXBean
runtimeMxBean
=
ManagementFactory
.
getRuntimeMXBean
();
return
runtimeMxBean
.
getName
();
return
StringHelper
.
getId
(
planLevelNamespaceServerIp
.
getLevelNamespace
(),
planLevelNamespaceApplication
.
getLevelNamespace
()
);
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment