Class AbstractDiskSpeedStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<DiskAllocationStrategy>
-
- org.jenkinsci.plugins.ewm.DiskAllocationStrategy
-
- org.jenkinsci.plugins.ewm.strategies.AbstractDiskSpeedStrategy
-
- All Implemented Interfaces:
ExtensionPoint,Describable<DiskAllocationStrategy>
- Direct Known Subclasses:
FastestReadSpeedStrategy,FastestWriteSpeedStrategy
public abstract class AbstractDiskSpeedStrategy extends DiskAllocationStrategy
Base class that selects theDiskwith the highest speed provided by thegetDiskSpeed(DiskInfoProvider)method- Author:
- Alexandru Somai
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description AbstractDiskSpeedStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description DiskallocateDisk(List<Disk> disks)Allocates a disk from the given list.protected abstract intgetDiskSpeed(DiskInfoProvider diskInfo)Override this method to return the speed property on which the selection should be made.-
Methods inherited from class org.jenkinsci.plugins.ewm.DiskAllocationStrategy
all, allDescriptors, getEstimatedWorkspaceSize, retrieveUsableSpaceInBytes, retrieveUsableSpaceInMegaBytes, setEstimatedWorkspaceSize
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Method Detail
-
allocateDisk
@Nonnull public Disk allocateDisk(@Nonnull List<Disk> disks) throws IOException
Description copied from class:DiskAllocationStrategyAllocates a disk from the given list. The list contains at least oneDiskentry.- Specified by:
allocateDiskin classDiskAllocationStrategy- 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 theDiskentry, 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- theDiskInfoProviderthat contains R/WDiskspeed- Returns:
- the value represented by the R/W speed
-
-