Interface IStatsCollector

All Known Implementing Classes:
StatsCollector

public interface IStatsCollector
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if cpu usage and ram usage does not exceed the limit
    int
    It's configurable and it's based on percentage.
    int
    It calculates the average CPU usage for a specified time.
    int
    In MB
    int
    It's configurable In MB
  • Field Details

  • Method Details

    • getCpuLoad

      int getCpuLoad()
      It calculates the average CPU usage for a specified time.
      Returns:
      the current CPU usage
    • getCpuLimit

      int getCpuLimit()
      It's configurable and it's based on percentage. Max value is 100.
      Returns:
      the CPU limit that server does not exceed.
    • getMinFreeRamSize

      int getMinFreeRamSize()
      It's configurable In MB
      Returns:
      the free RAM size that server should have all the time
    • getFreeRam

      int getFreeRam()
      In MB
      Returns:
      the free RAM that server can use
    • enoughResource

      boolean enoughResource()
      Check if cpu usage and ram usage does not exceed the limit
      Returns:
      true if not exceeding the limit, false if exceeding limit