Class MostUsableSpaceStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<DiskAllocationStrategy>
-
- org.jenkinsci.plugins.ewm.DiskAllocationStrategy
-
- org.jenkinsci.plugins.ewm.strategies.MostUsableSpaceStrategy
-
- All Implemented Interfaces:
ExtensionPoint,Describable<DiskAllocationStrategy>
@Extension public class MostUsableSpaceStrategy extends DiskAllocationStrategy
DiskAllocationStrategyimplementation that allocates the disk with the most usable space.- Author:
- Alexandru Somai
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMostUsableSpaceStrategy.DescriptorImpl-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description MostUsableSpaceStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiskallocateDisk(List<Disk> disks)Allocates a disk from the given list.voidsetEstimatedWorkspaceSize(long estimatedWorkspaceSize)Sets the estimated workspace size.-
Methods inherited from class org.jenkinsci.plugins.ewm.DiskAllocationStrategy
all, allDescriptors, getEstimatedWorkspaceSize, retrieveUsableSpaceInBytes, retrieveUsableSpaceInMegaBytes
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Method Detail
-
setEstimatedWorkspaceSize
@DataBoundSetter public void setEstimatedWorkspaceSize(long estimatedWorkspaceSize)
Description copied from class:DiskAllocationStrategySets the estimated workspace size. It must be set in MB.- Overrides:
setEstimatedWorkspaceSizein classDiskAllocationStrategy- Parameters:
estimatedWorkspaceSize- the estimated workspace size in MB
-
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
-
-