Package hudson.node_monitors
Class AbstractAsyncNodeMonitorDescriptor<T>
java.lang.Object
hudson.model.Descriptor<NodeMonitor>
hudson.node_monitors.AbstractNodeMonitorDescriptor<T>
hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor<T>
- Type Parameters:
T
- represents the result of the monitoring.
- Direct Known Subclasses:
ArchitectureMonitor.DescriptorImpl
,ClockMonitor.DescriptorImpl
,DiskSpaceMonitorDescriptor
,ResponseTimeMonitor.DescriptorImpl
,SwapSpaceMonitor.DescriptorImpl
public abstract class AbstractAsyncNodeMonitorDescriptor<T>
extends AbstractNodeMonitorDescriptor<T>
Sophisticated version of
AbstractNodeMonitorDescriptor
that
performs monitoring on all agents concurrently and asynchronously.- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static final class
Result object formonitorDetailed()
to facilitate extending information returned in the future.Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
-
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
AbstractAsyncNodeMonitorDescriptor
(long interval) protected
AbstractAsyncNodeMonitorDescriptor
(Class<? extends NodeMonitor> clazz) protected
AbstractAsyncNodeMonitorDescriptor
(Class<? extends NodeMonitor> clazz, long interval) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract hudson.remoting.Callable<T,
IOException> Creates aCallable
that performs the monitoring when executed.monitor()
Performs all monitoring concurrently.protected T
Performs monitoring of the given computer object.protected final AbstractAsyncNodeMonitorDescriptor.Result<T>
Perform monitoring with detailed reporting.Methods inherited from class hudson.node_monitors.AbstractNodeMonitorDescriptor
canTakeOffline, get, getConfigPage, getMonitoringTimeOut, getTimestamp, getTimestampString, isIgnored, markOffline, markOffline, markOnline
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
Constructor Details
-
AbstractAsyncNodeMonitorDescriptor
protected AbstractAsyncNodeMonitorDescriptor() -
AbstractAsyncNodeMonitorDescriptor
protected AbstractAsyncNodeMonitorDescriptor(long interval) -
AbstractAsyncNodeMonitorDescriptor
-
AbstractAsyncNodeMonitorDescriptor
-
-
Method Details
-
createCallable
Creates aCallable
that performs the monitoring when executed. -
monitor
Description copied from class:AbstractNodeMonitorDescriptor
Performs monitoring of the given computer object. This method is invoked periodically to perform the monitoring of the computer.- Specified by:
monitor
in classAbstractNodeMonitorDescriptor<T>
- Returns:
- Application-specific value that represents the observed monitoring value
on the given node. This value will be returned from the
AbstractNodeMonitorDescriptor.get(Computer)
method. If null is returned, it will be interpreted as "no observed value." This is convenient way of abandoning the observation on a particular computer, whereasIOException
is useful for indicating a hard error that needs to be corrected. - Throws:
IOException
InterruptedException
-
monitor
Performs all monitoring concurrently.- Overrides:
monitor
in classAbstractNodeMonitorDescriptor<T>
- Returns:
- Mapping from computer to monitored value. The map values can be null for several reasons, see
AbstractAsyncNodeMonitorDescriptor.Result
for more details. - Throws:
InterruptedException
-
monitorDetailed
@NonNull protected final AbstractAsyncNodeMonitorDescriptor.Result<T> monitorDetailed() throws InterruptedExceptionPerform monitoring with detailed reporting.- Throws:
InterruptedException
-