Package hudson.node_monitors
Class DiskSpaceMonitorDescriptor.DiskSpace
java.lang.Object
hudson.slaves.OfflineCause
hudson.node_monitors.MonitorOfflineCause
hudson.node_monitors.DiskSpaceMonitorDescriptor.DiskSpace
- All Implemented Interfaces:
Serializable
,IOfflineCause
- Enclosing class:
- DiskSpaceMonitorDescriptor
@ExportedBean
public static final class DiskSpaceMonitorDescriptor.DiskSpace
extends MonitorOfflineCause
implements Serializable
Value object that represents the disk space.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.slaves.OfflineCause
OfflineCause.ByCLI, OfflineCause.ChannelTermination, OfflineCause.IdleOfflineCause, OfflineCause.LaunchFailed, OfflineCause.LegacyOfflineCause, OfflineCause.SimpleOfflineCause, OfflineCause.UserCause
-
Field Summary
Fields inherited from class hudson.slaves.OfflineCause
timestamp
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Deprecated.getPath()
The path that was checkedlong
long
Class<? extends AbstractDiskSpaceMonitor>
Identify monitor implementation that put computer offline.long
boolean
boolean
Parses a human readable size description like "1GB", "0.5m", "500KiB", etc.void
setThreshold
(long threshold) void
setTotalSize
(long totalSize) protected void
setTrigger
(Class<? extends AbstractDiskSpaceMonitor> trigger) Sets the trigger class which made the decisionvoid
setWarningThreshold
(long warningThreshold) toHtml()
Returns the HTML representation of the space.toString()
Methods inherited from class hudson.slaves.OfflineCause
create, getTimestamp
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface jenkins.agents.IOfflineCause
getComputerIcon, getComputerIconAltText, getIcon, getMessage, getReason, getStatusClass, getTime
-
Field Details
-
size
@Exported public final long size
-
-
Constructor Details
-
DiskSpace
- Parameters:
path
- Specify the file path that was monitored.
-
-
Method Details
-
setTotalSize
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public void setTotalSize(long totalSize) -
getTotalSize
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Exported public long getTotalSize() -
toString
-
getPath
The path that was checked -
getFreeSize
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public long getFreeSize() -
getGbLeft
Deprecated.Directly use the size field or to get a human-readable value with units useFunctions.humanReadableByteSize(long)
Gets GB left. -
toHtml
Returns the HTML representation of the space. -
isTriggered
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isTriggered() -
isWarning
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isWarning() -
setTrigger
Sets the trigger class which made the decision -
setThreshold
public void setThreshold(long threshold) -
getThreshold
@Exported public long getThreshold() -
setWarningThreshold
public void setWarningThreshold(long warningThreshold) -
getWarningThreshold
@Exported public long getWarningThreshold() -
getTrigger
Description copied from class:MonitorOfflineCause
Identify monitor implementation that put computer offline.- Specified by:
getTrigger
in classMonitorOfflineCause
-
parse
Parses a human readable size description like "1GB", "0.5m", "500KiB", etc. intoDiskSpaceMonitorDescriptor.DiskSpace
- Throws:
ParseException
- If failed to parse.
-
Functions.humanReadableByteSize(long)