Class MacHWDiskStore
java.lang.Object
oshi.hardware.common.AbstractHWDiskStore
oshi.hardware.common.platform.mac.MacHWDiskStore
- All Implemented Interfaces:
HWDiskStore
Base class for macOS HWDiskStore implementations. Subclasses provide platform-specific disk enumeration and
statistics updates.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enumStrings to convert to CFStringRef for pointer lookups. -
Field Summary
Fields inherited from class AbstractHWDiskStore
currentQueueLength, partitionList, readBytes, reads, timeStamp, transferTime, writeBytes, writesModifier and TypeFieldDescriptionprotected longprotected final AtomicReference<List<HWPartition>> protected longprotected longprotected longprotected longprotected longprotected long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMacHWDiskStore(String name, String model, String serial, long size) Creates a MacHWDiskStore with unknown disk type.protectedMacHWDiskStore(String name, String model, String serial, long size, String diskType) Creates a MacHWDiskStore. -
Method Summary
Methods inherited from class AbstractHWDiskStore
getCurrentQueueLength, getDiskType, getModel, getName, getPartitions, getReadBytes, getReads, getSerial, getSize, getTimeStamp, getTransferTime, getWriteBytes, getWrites, setDiskStats, setPartitionList, toStringModifier and TypeMethodDescriptionlongThe length of the disk queue (#I/O's in progress).The type of the disk, such as SSD, HDD, Removable, Virtual, or Unknown.getModel()The disk modelgetName()The disk nameThe partitions on this disk.longThe number of bytes read from the disklonggetReads()The number of reads from the diskThe disk serial number, if available.longgetSize()The size of the disklongThe time this disk's statistics were updated.longThe time spent reading or writing, in milliseconds.longThe number of bytes written to the disklongThe number of writes to the diskprotected voidsetDiskStats(long reads, long readBytes, long writes, long writeBytes, long currentQueueLength, long transferTime, long timeStamp) Sets the disk statistics.protected voidsetPartitionList(List<HWPartition> partitionList) Sets the partition list.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface HWDiskStore
updateAttributesModifier and TypeMethodDescriptionbooleanMake a best effort to update all the statistics about the drive without needing to recreate the drive list.
-
Constructor Details
-
MacHWDiskStore
-
MacHWDiskStore
-