Package oshi.driver.unix.aix
Class Lspv
- java.lang.Object
-
- oshi.driver.unix.aix.Lspv
-
@ThreadSafe public final class Lspv extends java.lang.Object
Utility to query lspv
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,java.util.List<HWPartition>>
PARTITION_CACHE
The lspv command incurs a lot of disk reads.
-
Constructor Summary
Constructors Modifier Constructor Description private
Lspv()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.List<HWPartition>
computeLogicalVolumes(java.lang.String device, java.util.Map<java.lang.String,Pair<java.lang.Integer,java.lang.Integer>> majMinMap)
static java.util.List<HWPartition>
queryLogicalVolumes(java.lang.String device, java.util.Map<java.lang.String,Pair<java.lang.Integer,java.lang.Integer>> majMinMap)
Querylspv
to get partition info, or return a cached value.
-
-
-
Field Detail
-
PARTITION_CACHE
private static final java.util.Map<java.lang.String,java.util.List<HWPartition>> PARTITION_CACHE
The lspv command incurs a lot of disk reads. Since partitions shouldn't change during operation, cache the result here.
-
-
Method Detail
-
queryLogicalVolumes
public static java.util.List<HWPartition> queryLogicalVolumes(java.lang.String device, java.util.Map<java.lang.String,Pair<java.lang.Integer,java.lang.Integer>> majMinMap)
Querylspv
to get partition info, or return a cached value.- Parameters:
device
- The disk to get the volumes from.majMinMap
- A map of device name to a pair with major and minor numbers.- Returns:
- A list of logical volumes (partitions) on this device.
-
computeLogicalVolumes
private static java.util.List<HWPartition> computeLogicalVolumes(java.lang.String device, java.util.Map<java.lang.String,Pair<java.lang.Integer,java.lang.Integer>> majMinMap)
-
-