public class HWDiskStore extends AbstractOshiJsonObject implements Comparable<HWDiskStore>
| Constructor and Description |
|---|
HWDiskStore()
Create a new HWDiskStore with default/empty values
|
HWDiskStore(String name,
String model,
String serial,
long size,
long reads,
long readBytes,
long writes,
long writeBytes,
long transferTime,
HWPartition[] partitions,
long timeStamp)
Create an object with all values
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(HWDiskStore store) |
boolean |
equals(Object obj) |
String |
getModel() |
String |
getName() |
HWPartition[] |
getPartitions() |
long |
getReadBytes() |
long |
getReads() |
String |
getSerial() |
long |
getSize() |
long |
getTimeStamp() |
long |
getTransferTime() |
long |
getWriteBytes() |
long |
getWrites() |
int |
hashCode() |
void |
setModel(String model) |
void |
setName(String name) |
void |
setPartitions(HWPartition[] partitions) |
void |
setReadBytes(long readBytes) |
void |
setReads(long reads) |
void |
setSerial(String serial) |
void |
setSize(long size) |
void |
setTimeStamp(long timeStamp) |
void |
setTransferTime(long transferTime) |
void |
setWriteBytes(long writeBytes) |
void |
setWrites(long writes) |
javax.json.JsonObject |
toJSON(Properties properties)
Returns this object as a
JsonObject. |
toCompactJSON, toCompactJSON, toJSON, toPrettyJSON, toPrettyJSON, toStringpublic HWDiskStore(String name, String model, String serial, long size, long reads, long readBytes, long writes, long writeBytes, long transferTime, HWPartition[] partitions, long timeStamp)
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 diskreadBytes - Number of bytes read from the diskwrites - Number of writes to the diskwriteBytes - Number of bytes written to the disktransferTime - milliseconds spent reading or writing to the diskpartitions - Partitions on this disktimeStamp - milliseconds since the epochpublic HWDiskStore()
public String getName()
public String getModel()
public String getSerial()
public long getSize()
public long getReads()
public long getReadBytes()
public long getWrites()
public long getWriteBytes()
public long getTransferTime()
public HWPartition[] getPartitions()
public long getTimeStamp()
public void setName(String name)
name - the name to setpublic void setModel(String model)
model - the model to setpublic void setSerial(String serial)
serial - the serial to setpublic void setSize(long size)
size - Set size of disk (in bytes)public void setReads(long reads)
reads - the reads to setpublic void setReadBytes(long readBytes)
readBytes - the bytes read to setpublic void setWrites(long writes)
writes - the writes to setpublic void setWriteBytes(long writeBytes)
writeBytes - the bytes written to setpublic void setTransferTime(long transferTime)
transferTime - milliseconds spent reading or writing to setpublic void setPartitions(HWPartition[] partitions)
partitions - Partitions of this diskpublic void setTimeStamp(long timeStamp)
timeStamp - The timeStamp to set.public javax.json.JsonObject toJSON(Properties properties)
JsonObject. The provided
properties will be set on this object to configure the type of
information returned using this and future invocations of
OshiJsonObject.toJSON().toJSON in interface OshiJsonObjectproperties - Properties to configure returned resultsJsonObject for this class.public int compareTo(HWDiskStore store)
compareTo in interface Comparable<HWDiskStore>Copyright © 2010–2017 oshi. All rights reserved.