/* * The MIT License * * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Thomas J. Black * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package hudson.node_monitors; import hudson.ExtensionPoint; import hudson.DescriptorExtensionList; import hudson.Extension; import hudson.tasks.Publisher; import hudson.model.Computer; import hudson.model.ComputerSet; import hudson.model.Describable; import hudson.model.Node; import jenkins.model.Jenkins; import hudson.model.Descriptor; import hudson.util.DescriptorList; import java.util.List; import javax.annotation.CheckForNull; import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.export.ExportedBean; /** * Extension point for managing and monitoring {@link Node}s. * *
* {@link NodeMonitor}s are persisted via XStream.
*
* @author Kohsuke Kawaguchi
* @since 1.123
*/
@ExportedBean
public abstract class NodeMonitor implements ExtensionPoint, Describable
* Many {@link NodeMonitor}s implement a logic that if the value goes above/below
* a threshold, the agent will be marked offline as a preventive measure.
* This flag controls that.
*
*
* Unlike {@link Publisher}, where the absence of an instance indicates that it's disengaged,
* in {@link NodeMonitor} this boolean flag is used to indicate the disengagement, so that
* monitors work in opt-out basis.
*/
public boolean isIgnored() {
return ignored;
}
public void setIgnored(boolean ignored) {
this.ignored = ignored;
}
/**
* All registered {@link NodeMonitor}s.
* @deprecated as of 1.286.
* Use {@link #all()} for read access and {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList