Package oshi.hardware.common
Class AbstractLogicalVolumeGroup
- java.lang.Object
-
- oshi.hardware.common.AbstractLogicalVolumeGroup
-
- All Implemented Interfaces:
LogicalVolumeGroup
- Direct Known Subclasses:
LinuxLogicalVolumeGroup
,MacLogicalVolumeGroup
,WindowsLogicalVolumeGroup
public class AbstractLogicalVolumeGroup extends java.lang.Object implements LogicalVolumeGroup
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLogicalVolumeGroup(java.lang.String name, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> lvMap, java.util.Set<java.lang.String> pvSet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.util.Set<java.lang.String>>
getLogicalVolumes()
Gets a map containing information about the logical volumes in the logical volume group, represented to the file system as block devices.java.lang.String
getName()
Gets the logical volume group name.java.util.Set<java.lang.String>
getPhysicalVolumes()
Gets a set of all physical volumes in this volume group.java.lang.String
toString()
-
-
-
Constructor Detail
-
AbstractLogicalVolumeGroup
protected AbstractLogicalVolumeGroup(java.lang.String name, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> lvMap, java.util.Set<java.lang.String> pvSet)
- Parameters:
name
- Name of the volume grouplvMap
- Logical volumes derived from this volume group and the physical volumes its mapped to.pvSet
- Set of physical volumes this volume group consists of.
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:LogicalVolumeGroup
Gets the logical volume group name.- Specified by:
getName
in interfaceLogicalVolumeGroup
- Returns:
- The name of the logical volume group.
-
getLogicalVolumes
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getLogicalVolumes()
Description copied from interface:LogicalVolumeGroup
Gets a map containing information about the logical volumes in the logical volume group, represented to the file system as block devices. The keyset for the map represents a collection of the logical volumes, while the values associated with these keys represent the physical volumes mapped to each logical volume (if known).- Specified by:
getLogicalVolumes
in interfaceLogicalVolumeGroup
- Returns:
- A map with the logical volume names as the key, and a set of associated physical volume names as the value.
-
getPhysicalVolumes
public java.util.Set<java.lang.String> getPhysicalVolumes()
Description copied from interface:LogicalVolumeGroup
Gets a set of all physical volumes in this volume group.- Specified by:
getPhysicalVolumes
in interfaceLogicalVolumeGroup
- Returns:
- A set with the names of the physical volumes.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-