Class SolarisHWDiskStore

java.lang.Object
oshi.hardware.common.AbstractHWDiskStore
oshi.hardware.common.platform.unix.solaris.SolarisHWDiskStore
All Implemented Interfaces:
HWDiskStore

@ThreadSafe public abstract class SolarisHWDiskStore extends AbstractHWDiskStore
Abstract base for Solaris HWDiskStore. The disk enumeration (getDisks(SolarisHWDiskStore.DiskStoreFactory)) and partition assembly are shared and call the common iostat/lshal/prtvtoc drivers; the kstat-based per-disk I/O stats are native and fetched by the JNA and FFM subclasses via queryStats().
  • Constructor Details

    • SolarisHWDiskStore

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

    • updateAttributes

      public boolean updateAttributes()
      Description copied from interface: HWDiskStore
      Make a best effort to update all the statistics about the drive without needing to recreate the drive list. This method provides for more frequent periodic updates of individual drive statistics but may be less efficient to use if updating all drives. It will not detect if a removable drive has been removed and replaced by a different drive in between method calls.
      Returns:
      True if the update was (probably) successful, false if the disk was not found
    • getDisks

      protected static List<HWDiskStore> getDisks(SolarisHWDiskStore.DiskStoreFactory factory)
      Gets the disks on this machine, building each store with the given concrete factory.
      Parameters:
      factory - creates the platform-specific store instances
      Returns:
      a list of HWDiskStore objects representing the disks
    • queryStats

      protected abstract SolarisHWDiskStore.DiskStats queryStats()
      Looks up this disk's per-disk I/O stats from the subclass's kstat data source.
      Returns:
      stats POJO, or null if no entry was found for this disk name