Class AbstractDiskSpeedStrategy

    • Constructor Detail

      • AbstractDiskSpeedStrategy

        public AbstractDiskSpeedStrategy()
    • Method Detail

      • allocateDisk

        @Nonnull
        public Disk allocateDisk​(@Nonnull
                                 List<Disk> disks)
                          throws IOException
        Description copied from class: DiskAllocationStrategy
        Allocates a disk from the given list. The list contains at least one Disk entry.
        Specified by:
        allocateDisk in class DiskAllocationStrategy
        Parameters:
        disks - the entries from which to allocate a disk. The list has at least one element
        Returns:
        the selected disk
        Throws:
        IOException - if any mandatory field is missing from the Disk entry, or if the disk allocation fails for any reason
      • getDiskSpeed

        protected abstract int getDiskSpeed​(@Nonnull
                                            DiskInfoProvider diskInfo)
        Override this method to return the speed property on which the selection should be made.
        Parameters:
        diskInfo - the DiskInfoProvider that contains R/W Disk speed
        Returns:
        the value represented by the R/W speed