Package hudson.node_monitors
Class AbstractDiskSpaceMonitor
- java.lang.Object
-
- hudson.node_monitors.NodeMonitor
-
- hudson.node_monitors.AbstractDiskSpaceMonitor
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<NodeMonitor>
- Direct Known Subclasses:
DiskSpaceMonitor
,TemporarySpaceMonitor
public abstract class AbstractDiskSpaceMonitor extends NodeMonitor
- Author:
- Kohsuke Kawaguchi
- See Also:
DiskSpaceMonitorDescriptor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description String
freeSpaceThreshold
The free space threshold, below which the node monitor will be triggered.-
Fields inherited from class hudson.node_monitors.NodeMonitor
LIST
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDiskSpaceMonitor()
protected
AbstractDiskSpaceMonitor(String threshold)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
data(Computer c)
Obtains the monitoring result currently available, or null if no data is available.long
getThresholdBytes()
DiskSpaceMonitorDescriptor.DiskSpace
markNodeOfflineIfDiskspaceIsTooLow(Computer c)
Marks the given node as offline if free disk space is below the configured threshold.-
Methods inherited from class hudson.node_monitors.NodeMonitor
all, getAll, getColumnCaption, getDescriptor, isIgnored, setIgnored, triggerUpdate
-
-
-
-
Field Detail
-
freeSpaceThreshold
public final String freeSpaceThreshold
The free space threshold, below which the node monitor will be triggered. This is a human readable string representation as entered by the user, so that we can retain the original notation.
-
-
Constructor Detail
-
AbstractDiskSpaceMonitor
protected AbstractDiskSpaceMonitor(String threshold) throws ParseException
- Throws:
ParseException
-
AbstractDiskSpaceMonitor
protected AbstractDiskSpaceMonitor()
-
-
Method Detail
-
getThresholdBytes
public long getThresholdBytes()
-
data
public Object data(Computer c)
Description copied from class:NodeMonitor
Obtains the monitoring result currently available, or null if no data is available.- Overrides:
data
in classNodeMonitor
-
markNodeOfflineIfDiskspaceIsTooLow
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public DiskSpaceMonitorDescriptor.DiskSpace markNodeOfflineIfDiskspaceIsTooLow(Computer c)
Marks the given node as offline if free disk space is below the configured threshold.- Parameters:
c
- the node- Returns:
- the free space
- Since:
- 1.521
-
-