Class MacHWDiskStore

java.lang.Object
oshi.hardware.common.AbstractHWDiskStore
oshi.hardware.common.platform.mac.MacHWDiskStore
All Implemented Interfaces:
HWDiskStore

@ThreadSafe public abstract class MacHWDiskStore extends AbstractHWDiskStore
Base class for macOS HWDiskStore implementations. Subclasses provide platform-specific disk enumeration and statistics updates.
  • Constructor Details

    • MacHWDiskStore

      protected MacHWDiskStore(String name, String model, String serial, long size)
  • Method Details

    • getReads

      public long getReads()
      Description copied from interface: HWDiskStore
      The number of reads from the disk
      Returns:
      the reads
    • getReadBytes

      public long getReadBytes()
      Description copied from interface: HWDiskStore
      The number of bytes read from the disk
      Returns:
      the bytes read
    • getWrites

      public long getWrites()
      Description copied from interface: HWDiskStore
      The number of writes to the disk
      Returns:
      the writes
    • getWriteBytes

      public long getWriteBytes()
      Description copied from interface: HWDiskStore
      The number of bytes written to the disk
      Returns:
      the bytes written
    • getCurrentQueueLength

      public long getCurrentQueueLength()
      Description copied from interface: HWDiskStore
      The length of the disk queue (#I/O's in progress). Includes I/O requests that have been issued to the device driver but have not yet completed. Not supported on macOS.
      Returns:
      the current disk queue length
    • getTransferTime

      public long getTransferTime()
      Description copied from interface: HWDiskStore
      The time spent reading or writing, in milliseconds.
      Returns:
      the transfer time
    • getTimeStamp

      public long getTimeStamp()
      Description copied from interface: HWDiskStore
      The time this disk's statistics were updated.
      Returns:
      the timeStamp, in milliseconds since the epoch.
    • getPartitions

      public List<HWPartition> getPartitions()
      Description copied from interface: HWDiskStore
      The partitions on this disk.
      Returns:
      an UnmodifiableList of the partitions on this drive.
    • setReads

      protected void setReads(long reads)
    • setReadBytes

      protected void setReadBytes(long readBytes)
    • setWrites

      protected void setWrites(long writes)
    • setWriteBytes

      protected void setWriteBytes(long writeBytes)
    • setCurrentQueueLength

      protected void setCurrentQueueLength(long currentQueueLength)
    • setTransferTime

      protected void setTransferTime(long transferTime)
    • setTimeStamp

      protected void setTimeStamp(long timeStamp)
    • setPartitionList

      protected void setPartitionList(List<HWPartition> partitionList)