Interface VolumeChoosingPolicy

All Known Implementing Classes:
CapacityVolumeChoosingPolicy, RoundRobinVolumeChoosingPolicy

@Private public interface VolumeChoosingPolicy
This interface specifies the policy for choosing volumes to store replicas.
  • Method Summary

    Modifier and Type
    Method
    Description
    chooseVolume(List<HddsVolume> volumes, long maxContainerSize)
    Choose a volume to place a container, given a list of volumes and the max container size sought for storage.
  • Method Details

    • chooseVolume

      HddsVolume chooseVolume(List<HddsVolume> volumes, long maxContainerSize) throws IOException
      Choose a volume to place a container, given a list of volumes and the max container size sought for storage. The implementations of this interface must be thread-safe.
      Parameters:
      volumes - - a list of available volumes.
      maxContainerSize - - the maximum size of the container for which a volume is sought.
      Returns:
      the chosen volume.
      Throws:
      IOException - when disks are unavailable or are full.