T
- represents the the result of the monitoring.public abstract class AbstractNodeMonitorDescriptor<T> extends Descriptor<NodeMonitor>
NodeMonitor
implementation
where the "monitoring" consists of executing something periodically on every node
and taking some action based on its result.Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self
clazz
Modifier | Constructor and Description |
---|---|
protected |
AbstractNodeMonitorDescriptor()
Deprecated.
as of 1.522
Extend from
AbstractAsyncNodeMonitorDescriptor |
protected |
AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz)
Deprecated.
as of 1.522
Extend from
AbstractAsyncNodeMonitorDescriptor |
protected |
AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz,
long interval)
Deprecated.
as of 1.522
Extend from
AbstractAsyncNodeMonitorDescriptor |
protected |
AbstractNodeMonitorDescriptor(long interval)
Deprecated.
as of 1.522
Extend from
AbstractAsyncNodeMonitorDescriptor |
Modifier and Type | Method and Description |
---|---|
T |
get(Computer c)
Obtains the monitoring result currently available, or null if no data is available.
|
protected long |
getMonitoringTimeOut()
Controls the time out of monitoring.
|
long |
getTimestamp()
The timestamp that indicates when the last round of the monitoring has completed.
|
String |
getTimestampString() |
boolean |
isIgnored()
Is this monitor currently ignored?
|
protected boolean |
markOffline(Computer c)
Deprecated.
as of 1.320
Use
markOffline(Computer, OfflineCause) to specify the cause. |
protected boolean |
markOffline(Computer c,
OfflineCause oc)
Utility method to mark the computer offline for derived classes.
|
protected boolean |
markOnline(Computer c)
Utility method to mark the computer online for derived classes.
|
protected Map<Computer,T> |
monitor()
Performs monitoring across the board.
|
protected abstract T |
monitor(Computer c)
Performs monitoring of the given computer object.
|
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
@Deprecated protected AbstractNodeMonitorDescriptor()
AbstractAsyncNodeMonitorDescriptor
@Deprecated protected AbstractNodeMonitorDescriptor(long interval)
AbstractAsyncNodeMonitorDescriptor
@Deprecated protected AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz)
AbstractAsyncNodeMonitorDescriptor
@Deprecated protected AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz, long interval)
AbstractAsyncNodeMonitorDescriptor
protected abstract T monitor(Computer c) throws IOException, InterruptedException
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,
whereas IOException
is useful for indicating a hard error that needs to be
corrected.IOException
InterruptedException
protected Map<Computer,T> monitor() throws InterruptedException
InterruptedException
public T get(Computer c)
If no data is available, a background task to collect data will be started.
public long getTimestamp()
public String getTimestampString()
public boolean isIgnored()
protected boolean markOnline(Computer c)
protected boolean markOffline(Computer c, OfflineCause oc)
@Deprecated protected boolean markOffline(Computer c)
markOffline(Computer, OfflineCause)
to specify the cause.protected long getMonitoringTimeOut()
Copyright © 2018. All rights reserved.