Class AlertBeanUtils

java.lang.Object
org.openspaces.admin.internal.alert.bean.util.AlertBeanUtils

public class AlertBeanUtils extends Object
  • Constructor Details

    • AlertBeanUtils

      public AlertBeanUtils()
  • Method Details

    • getAverage

      public static double getAverage(int period, List<Double> timeline)
      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

      public static String generateBeanUUID(Class<? extends AlertBean> clazz)
      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

      public static String getGridComponentShortName(VirtualMachine virtualMachine)
      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

      public static String getGridComponentFullName(VirtualMachine virtualMachine)
      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

      public static String getGridComponentDescription(VirtualMachine virtualMachine)
      Returns:
      Returns the description of this virtual machine: "[short name] [pid] on [host name]/[host address]"
    • getMachineDescription

      public static String getMachineDescription(Machine machine)
      Returns:
      Returns the description of the machine: "[host name]/[host address]"
    • getMachineDescription

      public static String getMachineDescription(OperatingSystemDetails details)
      Returns:
      Returns the description of the machine: "[host name]/[host address]"
    • getSpaceInstanceDescription

      public static String getSpaceInstanceDescription(SpaceInstance spaceInstance)
      Returns:
      "[name].[partition] [primary/backup] on [host name]/[host address]"
    • getProcessingUnitDescription

      public static String getProcessingUnitDescription(ProcessingUnit processingUnit)
      Returns:
      "[name]"
    • getCpuPercToString

      public static String getCpuPercToString(double cpuPerc)