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
- Enclosing class:
- DiskSpaceMonitorDescriptor
@ExportedBean public static final class DiskSpaceMonitorDescriptor.DiskSpace extends MonitorOfflineCause implements Serializable
Value object that represents the disk space.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class hudson.slaves.OfflineCause
OfflineCause.ByCLI, OfflineCause.ChannelTermination, OfflineCause.IdleOfflineCause, OfflineCause.LaunchFailed, OfflineCause.SimpleOfflineCause, OfflineCause.UserCause
-
-
Field Summary
Fields Modifier and Type Field Description long
size
-
Fields inherited from class hudson.slaves.OfflineCause
timestamp
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getFreeSize()
String
getGbLeft()
Gets GB left.String
getPath()
The path that was checkedClass<? extends AbstractDiskSpaceMonitor>
getTrigger()
Identify monitor implementation that put computer offline.static DiskSpaceMonitorDescriptor.DiskSpace
parse(String size)
Parses a human readable size description like "1GB", "0.5m", etc.protected void
setTriggered(boolean triggered)
Sets whether this disk space amount should be treated as outside the acceptable conditions or not.protected void
setTriggered(Class<? extends AbstractDiskSpaceMonitor> trigger, boolean triggered)
Same assetTriggered(boolean)
, also sets the trigger class which made the decisionString
toHtml()
Returns the HTML representation of the space.String
toString()
-
Methods inherited from class hudson.slaves.OfflineCause
create, getTime, getTimestamp
-
-
-
-
Constructor Detail
-
DiskSpace
public DiskSpace(String path, long size)
- Parameters:
path
- Specify the file path that was monitored.
-
-
Method Detail
-
getPath
@Exported public String getPath()
The path that was checked
-
getFreeSize
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public long getFreeSize()
-
getGbLeft
public String getGbLeft()
Gets GB left.
-
toHtml
public String toHtml()
Returns the HTML representation of the space.
-
setTriggered
protected void setTriggered(boolean triggered)
Sets whether this disk space amount should be treated as outside the acceptable conditions or not.
-
setTriggered
protected void setTriggered(Class<? extends AbstractDiskSpaceMonitor> trigger, boolean triggered)
Same assetTriggered(boolean)
, also sets the trigger class which made the decision
-
getTrigger
public Class<? extends AbstractDiskSpaceMonitor> getTrigger()
Description copied from class:MonitorOfflineCause
Identify monitor implementation that put computer offline.- Specified by:
getTrigger
in classMonitorOfflineCause
-
parse
public static DiskSpaceMonitorDescriptor.DiskSpace parse(String size) throws ParseException
Parses a human readable size description like "1GB", "0.5m", etc. intoDiskSpaceMonitorDescriptor.DiskSpace
- Throws:
ParseException
- If failed to parse.
-
-