Class AlertBeanUtils
java.lang.Object
org.openspaces.admin.internal.alert.bean.util.AlertBeanUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateBeanUUID(Class<? extends AlertBean> clazz) Generate a unique bean UUID for a specific class by it's name.static doublegetAverage(int period, List<Double> timeline) average in specified period.static StringgetCpuPercToString(double cpuPerc) static StringgetGridComponentDescription(VirtualMachine virtualMachine) static StringgetGridComponentFullName(VirtualMachine virtualMachine) Returns the full name of a grid component running inside a JVM.static StringgetGridComponentShortName(VirtualMachine virtualMachine) Returns the short name of a grid component running inside a JVM.static StringgetMachineDescription(Machine machine) static Stringstatic StringgetProcessingUnitDescription(ProcessingUnit processingUnit) static StringgetSpaceInstanceDescription(SpaceInstance spaceInstance)
-
Constructor Details
-
AlertBeanUtils
public AlertBeanUtils()
-
-
Method Details
-
getAverage
average in specified period.- Parameters:
period- sliding window of timeline samples.timeline- timeline of samples.- Returns:
- -1 if not enough samples; average of samples within period.
-
generateBeanUUID
Generate a unique bean UUID for a specific class by it's name.- Parameters:
clazz- the class of the alert bean to generate a UUID for.- Returns:
- a UUID consisting of the name as hexadecimal digits concatenated with a random UUID.
-
getGridComponentShortName
Returns the short name of a grid component running inside a JVM. Inspects the JVM in the following order - GSM, GSC, GSA, LUS.- Returns:
- initials of the grid component. empty string if no component found.
-
getGridComponentFullName
Returns the full name of a grid component running inside a JVM. Inspects the JVM in the following order - GSM, GSC, GSA, LUS.- Returns:
- full name of a grid component. "n/a" if no component found.
-
getGridComponentDescription
- Returns:
- Returns the description of this virtual machine: "[short name] [pid] on [host name]/[host address]"
-
getMachineDescription
- Returns:
- Returns the description of the machine: "[host name]/[host address]"
-
getMachineDescription
- Returns:
- Returns the description of the machine: "[host name]/[host address]"
-
getSpaceInstanceDescription
- Returns:
- "[name].[partition] [primary/backup] on [host name]/[host address]"
-
getProcessingUnitDescription
- Returns:
- "[name]"
-
getCpuPercToString
-