View Javadoc
1   /*
2    * Copyright 2021-2022 The OSHI Project Contributors
3    * SPDX-License-Identifier: MIT
4    */
5   package oshi.hardware;
6   
7   import java.util.Map;
8   import java.util.Set;
9   
10  import oshi.annotation.concurrent.Immutable;
11  
12  /**
13   * A logical volume group implemented as part of logical volume management, combining the space on one or more storage
14   * devices such as disks or partitions (physical volumes) into a storage pool, and subsequently allocating that space to
15   * virtual partitions (logical volumes) as block devices accessible to the file system.
16   */
17  @Immutable
18  public interface LogicalVolumeGroup {
19      /**
20       * Gets the logical volume group name.
21       *
22       * @return The name of the logical volume group.
23       */
24      String getName();
25  
26      /**
27       * Gets a set of all physical volumes in this volume group.
28       *
29       * @return A set with the names of the physical volumes.
30       */
31      Set<String> getPhysicalVolumes();
32  
33      /**
34       * Gets a map containing information about the logical volumes in the logical volume group, represented to the file
35       * system as block devices. The keyset for the map represents a collection of the logical volumes, while the values
36       * associated with these keys represent the physical volumes mapped to each logical volume (if known).
37       *
38       * @return A map with the logical volume names as the key, and a set of associated physical volume names as the
39       *         value.
40       */
41      Map<String, Set<String>> getLogicalVolumes();
42  }