Package io.jenkins.plugins.specsmonitor
Class MemoryInfo
java.lang.Object
io.jenkins.plugins.specsmonitor.MemoryInfo
- All Implemented Interfaces:
Serializable
Total, free and available physical memory (RAM) of a node.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMemoryInfo(long totalBytes) MemoryInfo(long totalBytes, long freeBytes, long availableBytes) -
Method Summary
Modifier and TypeMethodDescriptionlongHuman-readable available (or free) memory using binary units, e.g.longTooltip text, e.g.longlongMemory that applications can use right now: the available memory if known, otherwise the free memory.toString()
-
Constructor Details
-
MemoryInfo
public MemoryInfo(long totalBytes) - Parameters:
totalBytes- total physical memory in bytes, or a value<= 0if unknown
-
MemoryInfo
public MemoryInfo(long totalBytes, long freeBytes, long availableBytes) - Parameters:
totalBytes- total physical memory in bytes, or a value<= 0if unknownfreeBytes- memory that is completely unused, or a negative value if unknownavailableBytes- memory that can be used by applications without swapping (free memory plus reclaimable caches), or a negative value if unknown
-
-
Method Details
-
getTotalBytes
public long getTotalBytes() -
getFreeBytes
public long getFreeBytes() -
getAvailableBytes
public long getAvailableBytes() -
getUsableBytes
public long getUsableBytes()Memory that applications can use right now: the available memory if known, otherwise the free memory. -
getDisplay
Human-readable available (or free) memory using binary units, e.g.43.5 GiB, orN/A. -
getTooltip
Tooltip text, e.g.43.5 GiB free of 63.7 GiB. If the operating system reports different values for available memory (usable without swapping, including reclaimable caches) and free memory (completely unused), both are shown, e.g.Available: 8.4 GiB of 15.6 GiB, Free: 1.2 GiB. Empty if neither is known. -
toString
-