public abstract class NodeIterator<N extends hudson.model.Node> extends Object implements Iterator<N>, hudson.ExtensionPoint
Nodes in the system, even nodes which are not attached to the main
Jenkins object. If you are holding onto nodes that are not attached to the main Jenkins object
then you need to have an Extension which extends this class and can iterate through your Nodes.| Constructor and Description |
|---|
NodeIterator() |
| Modifier and Type | Method and Description |
|---|---|
protected <N extends hudson.model.Node> |
hasCompleteLiveSet(Class<N> nodeClass)
Implementers of
NodeIterator should override this method if they "lend" Node instances to
other JVMs and they require an on-line connection to those JVMs in order to iterate the Node instances
that have been "lent". |
static boolean |
isComplete()
|
static <N extends hudson.model.Node> |
isComplete(Class<N> nodeClass)
Returns
true if and only if iterator() will iterate
all live instances of the specified subtype of Node. |
static NodeIterator<hudson.model.Node> |
iterator()
Returns a new iterator of all the
Nodes in the system. |
static <N extends hudson.model.Node> |
iterator(Class<N> nodeClass)
Returns a new iterator of all the
Nodes in the system. |
static Iterable<hudson.model.Node> |
nodes()
Adapter to allow easy use from Java 5+ for loops.
|
static <N extends hudson.model.Node> |
nodes(Class<N> nodeClass)
Adapter to allow easy use from Java 5+ for loops.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, hasNext, next, remove@NonNull public static NodeIterator<hudson.model.Node> iterator()
Nodes in the system.Nodes in the system.@NonNull public static Iterable<hudson.model.Node> nodes()
Iterable.@NonNull public static <N extends hudson.model.Node> NodeIterator<N> iterator(@NonNull Class<N> nodeClass)
Nodes in the system.N - the class type of nodenodeClass - the type of NodeNodes in the system.@NonNull public static <N extends hudson.model.Node> Iterable<N> nodes(@NonNull Class<N> nodeClass)
nodes()N - the class type of nodenodeClass - the type of NodeIterable.public static boolean isComplete()
true if and only if iterator() will iterate
all live instances of Node. This is useful if you want to resolve any backing resources that do not
have a corresponding Node instance. If this method returns false then it will not be possible
to definitively determine the complete live set and hence it will not be possible to definitively identify
unused backing resources.true if and only if iterator() will iterate
all live instances of Node.public static <N extends hudson.model.Node> boolean isComplete(@NonNull
Class<N> nodeClass)
true if and only if iterator() will iterate
all live instances of the specified subtype of Node. This is useful if you want to resolve any backing
resources that do not have a corresponding Node instance. If this method returns false then it
will not be possible to definitively determine the complete live set and hence it will not be possible to
definitively identify unused backing resources.N - the class type of nodenodeClass - the type of Nodetrue if and only if iterator() will iterate
all live instances of Node.protected <N extends hudson.model.Node> boolean hasCompleteLiveSet(@NonNull
Class<N> nodeClass)
NodeIterator should override this method if they "lend" Node instances to
other JVMs and they require an on-line connection to those JVMs in order to iterate the Node instances
that have been "lent". Where an implementer only "lends" a specific sub-type of Node it should return
true if the specified node type is not a sub-type of the type of Node that it leases.
Implementers should only return false when the type of Node they "lend" is a sub-type of
the specified type and at least one of their connections to remote JVMs is off-line in order to allow
clients of the NodeIterator API to identify unused backing resources.N - the sub-type of Node that is being queried.nodeClass - the sub-type of Node that is being queried.false if and only if this NodeIterator cannot currently return the full set of
Node instances of the specified type as a result of a transient loss of remote connectivityCopyright © 2016–2021. All rights reserved.