Package org.onosproject.net.behaviour
Class DeviceMemoryStats
- java.lang.Object
-
- org.onosproject.net.behaviour.DeviceMemoryStats
-
public class DeviceMemoryStats extends Object
A representation of memory stats of device.
-
-
Constructor Summary
Constructors Constructor Description DeviceMemoryStats()Instantiates DeviceMemoryStats object.DeviceMemoryStats(long free, long used, long total)Creates DeviceMemoryStats object with given data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)longgetFree()Get free memory of device.longgetTotal()Get total memory of device.longgetUsed()Get used memory of device.inthashCode()voidsetFree(long free)Set free memory of device.voidsetTotal(long total)Set total memory of device.voidsetUsed(long used)Set used memory of device.StringtoString()
-
-
-
Constructor Detail
-
DeviceMemoryStats
public DeviceMemoryStats()
Instantiates DeviceMemoryStats object.
-
DeviceMemoryStats
public DeviceMemoryStats(long free, long used, long total)Creates DeviceMemoryStats object with given data.- Parameters:
free- free memoryused- used memorytotal- total memory
-
-
Method Detail
-
getTotal
public long getTotal()
Get total memory of device.- Returns:
- totalMmeory, total memory
-
getUsed
public long getUsed()
Get used memory of device.- Returns:
- usedMemory, used memory
-
getFree
public long getFree()
Get free memory of device.- Returns:
- freeMemory, free memory
-
setFree
public void setFree(long free)
Set free memory of device.- Parameters:
free- free memory stats of device
-
setUsed
public void setUsed(long used)
Set used memory of device.- Parameters:
used- used memory stats of device
-
setTotal
public void setTotal(long total)
Set total memory of device.- Parameters:
total- total memory stats of device
-
-