Class ProcessSnapshot

  • All Implemented Interfaces:
    SerializableObject

    public class ProcessSnapshot
    extends java.lang.Object
    implements SerializableObject
    A snapshot of a process in the Cloud which provides information about the cpu and memory usage, the running threads and the pid.
    • Constructor Detail

      • ProcessSnapshot

        public ProcessSnapshot​(long heapUsageMemory,
                               long noHeapUsageMemory,
                               long maxHeapMemory,
                               int currentLoadedClassCount,
                               long totalLoadedClassCount,
                               long unloadedClassCount,
                               java.util.Collection<ThreadSnapshot> threads,
                               double cpuUsage,
                               int pid)
      • ProcessSnapshot

        public ProcessSnapshot()
    • Method Detail

      • empty

        public static ProcessSnapshot empty()
        Gets an empty snapshot without any information about the process.
        Returns:
        an empty constant ProcessSnapshot
      • getOwnPID

        public static int getOwnPID()
        Gets the PID of the current process or -1 if it couldn't be fetched.
      • getHeapUsageMemory

        public long getHeapUsageMemory()
      • getNoHeapUsageMemory

        public long getNoHeapUsageMemory()
      • getMaxHeapMemory

        public long getMaxHeapMemory()
      • getCurrentLoadedClassCount

        public int getCurrentLoadedClassCount()
      • getTotalLoadedClassCount

        public long getTotalLoadedClassCount()
      • getUnloadedClassCount

        public long getUnloadedClassCount()
      • getThreads

        public java.util.Collection<ThreadSnapshot> getThreads()
      • getCpuUsage

        public double getCpuUsage()
      • getPid

        public int getPid()