Package hudson.plugins.disk_usage
Class DiskUsageUtil
java.lang.Object
hudson.plugins.disk_usage.DiskUsageUtil
- Author:
- Lucie Votypkova
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classACallablewhich computes disk usage of remote file object -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddProperty(Item item) static voidcalculateDiskUsageForBuild(String buildId, AbstractProject project) static voidstatic voidstatic LongcalculateWorkspaceDiskUsageForPath(FilePath workspace, ArrayList<FilePath> exceeded) static voidcalculationDiskUsageOfBuild(AbstractBuild build, TaskListener listener) Calculate disk usage of build after its execution (or as post-build step)static voidstatic voidstatic StringformatTimeInMilisec(long time) static List<AbstractProject> getAllProjects(ItemGroup<? extends Item> itemGroup) static DategetDate(int unit, int count) static Datestatic LonggetFileSize(File f, List<File> exceedFiles) static intstatic doublegetScale(long number) static LonggetSizeInBytes(String stringSize) static StringgetSizeString(Long size) static StringgetUnitString(int floor) static booleanprotected static voidloadData(DiskUsageProperty property, boolean loadAllBuilds) static void
-
Field Details
-
LOGGER
-
-
Constructor Details
-
DiskUsageUtil
public DiskUsageUtil()
-
-
Method Details
-
addProperty
-
loadData
-
getDate
-
getDate
-
formatTimeInMilisec
-
sendEmail
- Throws:
jakarta.mail.MessagingException
-
getSizeInBytes
-
controlAllJobsExceedSize
- Throws:
IOException
-
controlWorkspaceExceedSize
-
parseExcludedJobsFromString
-
getSizeString
-
getScale
public static double getScale(long number) -
getIndex
-
getUnitString
-
calculationDiskUsageOfBuild
Calculate disk usage of build after its execution (or as post-build step)- Parameters:
build-listener-
-
isSymlink
- Throws:
IOException
-
getFileSize
- Throws:
IOException
-
calculateDiskUsageForProject
- Throws:
IOException
-
calculateDiskUsageForBuild
public static void calculateDiskUsageForBuild(String buildId, AbstractProject project) throws IOException - Throws:
IOException
-
calculateWorkspaceDiskUsageForPath
public static Long calculateWorkspaceDiskUsageForPath(FilePath workspace, ArrayList<FilePath> exceeded) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
calculateWorkspaceDiskUsage
public static void calculateWorkspaceDiskUsage(AbstractProject project) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
getAllProjects
-