public class MachinePoolPredicates
extends java.lang.Object
Constructor and Description |
---|
MachinePoolPredicates() |
Modifier and Type | Method and Description |
---|---|
static |
compose( |
static |
except( |
static |
except(MachineSet removedItems) |
static boolean |
isSubMapOf(java.util.Map<java.lang.String,java.lang.String> sub,
java.util.Map<java.lang.String,java.lang.String> bigger) |
static boolean |
matches(ReusableMachineTemplate template,
org.jclouds.compute.domain.NodeMetadata m)
True iff the node matches the criteria specified in this template.
|
static |
matching(ReusableMachineTemplate template) |
static |
withTag(java.lang.String tag) |
public staticexcept(MachineSet removedItems)
public staticexcept( predicateToExclude)
public staticmatching(ReusableMachineTemplate template)
public staticwithTag(java.lang.String tag)
public staticcompose( ... predicates)
public static boolean matches(ReusableMachineTemplate template, org.jclouds.compute.domain.NodeMetadata m)
NB: This only checks some of the most common fields, plus a hashcode (in strict mode). In strict mode you're practically guaranteed to match only machines created by this template. (Add a tag(uid) and you _will_ be guaranteed, strict mode or not.)
Outside strict mode, some things (OS and hypervisor) can fall through the gaps. But if that is a problem we can easily add them in.
(Caveat: If explicit Hardware, Image, and/or Template were specified in the template, then the hash code probably will not detect it.)
public static boolean isSubMapOf(java.util.Map<java.lang.String,java.lang.String> sub, java.util.Map<java.lang.String,java.lang.String> bigger)