Class SolarisHWDiskStore
java.lang.Object
oshi.hardware.common.AbstractHWDiskStore
oshi.hardware.common.platform.unix.solaris.SolarisHWDiskStore
- All Implemented Interfaces:
HWDiskStore
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().-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classPer-disk I/O stats the Solaris HAL reads.protected static interfaceCreates a concrete (JNA or FFM) Solaris disk store. -
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
ConstructorsModifierConstructorDescriptionprotectedSolarisHWDiskStore(String name, String model, String serial, long size) -
Method Summary
Modifier and TypeMethodDescriptionprotected static List<HWDiskStore> Gets the disks on this machine, building each store with the given concrete factory.protected abstract SolarisHWDiskStore.DiskStatsLooks up this disk's per-disk I/O stats from the subclass's kstat data source.booleanMake a best effort to update all the statistics about the drive without needing to recreate the drive list.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()
-
Constructor Details
-
SolarisHWDiskStore
-
-
Method Details
-
updateAttributes
public boolean updateAttributes()Description copied from interface:HWDiskStoreMake 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
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
HWDiskStoreobjects representing the disks
-
queryStats
Looks up this disk's per-disk I/O stats from the subclass's kstat data source.- Returns:
- stats POJO, or
nullif no entry was found for this disk name
-