public class HWDiskStore extends Object implements OshiJsonObject
| Constructor and Description |
|---|
HWDiskStore()
Create an object with empty/default values
|
HWDiskStore(String name,
String model,
String serial,
long size)
Create an object with empty/default read/write values
|
HWDiskStore(String name,
String model,
String serial,
long size,
long reads,
long writes)
Create an object with all values
|
| Modifier and Type | Method and Description |
|---|---|
String |
getModel() |
String |
getName() |
long |
getReads() |
String |
getSerial() |
long |
getSize() |
long |
getWrites() |
void |
setModel(String model) |
void |
setName(String name) |
void |
setReads(long reads) |
void |
setSerial(String serial) |
void |
setSize(long size) |
void |
setWrites(long writes) |
javax.json.JsonObject |
toJSON()
Creates a compact JSON string containing the information for this class
|
public HWDiskStore()
public HWDiskStore(String name, String model, String serial, long size)
name - Name of the disk (e.g., /dev/disk1)model - Model of the diskserial - Disk serial number, if availablesize - Disk capacity in bytespublic HWDiskStore(String name, String model, String serial, long size, long reads, long writes)
name - Name of the disk (e.g., /dev/disk1)model - Model of the diskserial - Disk serial number, if availablesize - Disk capacity in bytesreads - Number of reads from the diskwrites - Number of writes to the diskpublic String getName()
public void setName(String name)
name - the name to setpublic String getModel()
public void setModel(String model)
model - the model to setpublic String getSerial()
public void setSerial(String serial)
serial - the serial to setpublic long getSize()
public void setSize(long size)
size - Set size of disk (in bytes)public long getReads()
public void setReads(long reads)
reads - the reads to setpublic long getWrites()
public void setWrites(long writes)
writes - the writes to setpublic javax.json.JsonObject toJSON()
toJSON in interface OshiJsonObjectCopyright © 2010–2016 com.github.dblock. All rights reserved.