Brooklyn

brooklyn.location.jclouds.pool
[Java] Class MachinePoolPredicates

java.lang.Object
  brooklyn.location.jclouds.pool.MachinePoolPredicates

public class MachinePoolPredicates

Method Summary
static Predicate compose(Predicate... predicates)

static Predicate except(MachineSet removedItems)

static Predicate except(Predicate predicateToExclude)

static boolean isSubMapOf(java.util.Map sub, java.util.Map bigger)

static boolean matches(ReusableMachineTemplate template, NodeMetadata m)

True iff the node matches the criteria specified in this template.

static Predicate matching(ReusableMachineTemplate template)

static Predicate withTag(java.lang.String tag)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

compose

public static Predicate compose(Predicate... predicates)


except

public static Predicate except(MachineSet removedItems)


except

public static Predicate except(Predicate predicateToExclude)


isSubMapOf

public static boolean isSubMapOf(java.util.Map sub, java.util.Map bigger)


matches

public static boolean matches(ReusableMachineTemplate template, NodeMetadata m)
True iff the node matches the criteria specified in this template.

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.)


matching

public static Predicate matching(ReusableMachineTemplate template)


withTag

public static Predicate withTag(java.lang.String tag)


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.