You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ServiceLoadDataReport Class and ServiceLoadDataReportGenerator Class
The ServiceLoadDataReport class is used to represent ServiceLoadData, while the ServiceLoadDataReportGenerator enables threads to periodically retrieve data and report it.
public ServiceLoadDataReport(Usage CPU, Usage memory, int weight) {
this.CPU = CPU;
Memory = memory;
Weight = weight;
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Purpose
By using JAVA packages like
java.lang.management
to collect service load data and report it, provide data support for the operation of load balancer。Programs
Add Usage Class
Used to represent the usage of memory and CPU, and provides the percentUsage() method to calculate the percentage of resources.
Add ServiceLoadDataReport Class and ServiceLoadDataReportGenerator Class
The ServiceLoadDataReport class is used to represent ServiceLoadData, while the ServiceLoadDataReportGenerator enables threads to periodically retrieve data and report it.
Beta Was this translation helpful? Give feedback.
All reactions