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 boolean
equals(Object o)
long
getFree()
Get free memory of device.long
getTotal()
Get total memory of device.long
getUsed()
Get used memory of device.int
hashCode()
void
setFree(long free)
Set free memory of device.void
setTotal(long total)
Set total memory of device.void
setUsed(long used)
Set used memory of device.String
toString()
-
-
-
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
-
-