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
Nested ClassesModifier and TypeClassDescriptionprotected static final classResult 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
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractAsyncNodeMonitorDescriptor(long interval) protectedAbstractAsyncNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz) protectedAbstractAsyncNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz, long interval) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract hudson.remoting.Callable<T, IOException> Creates aCallablethat performs the monitoring when executed.monitor()Performs all monitoring concurrently.protected TPerforms 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, markOnlineMethods 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 aCallablethat performs the monitoring when executed. -
monitor
Description copied from class:AbstractNodeMonitorDescriptorPerforms monitoring of the given computer object. This method is invoked periodically to perform the monitoring of the computer.- Specified by:
monitorin 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, whereasIOExceptionis useful for indicating a hard error that needs to be corrected. - Throws:
IOExceptionInterruptedException
-
monitor
Performs all monitoring concurrently.- Overrides:
monitorin classAbstractNodeMonitorDescriptor<T>- Returns:
- Mapping from computer to monitored value. The map values can be null for several reasons, see
AbstractAsyncNodeMonitorDescriptor.Resultfor more details. - Throws:
InterruptedException
-
monitorDetailed
@NonNull protected final AbstractAsyncNodeMonitorDescriptor.Result<T> monitorDetailed() throws InterruptedExceptionPerform monitoring with detailed reporting.- Throws:
InterruptedException
-