Class ServerPredicates


  • public class ServerPredicates
    extends java.lang.Object
    Predicates relating to Openstack Server instances.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.function.Predicate<? super org.openstack4j.model.compute.Server> withStateIn​(org.openstack4j.model.compute.Server.Status... statuses)
      Creates a Predicate function that returns true for any Server with a status in a set of allowed values.
      static java.util.function.Predicate<org.openstack4j.model.compute.Server> withTag​(java.lang.String tag, java.lang.String tagValue)
      Creates a Predicate that checks Server instances for the existence of a given meta data tag.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServerPredicates

        public ServerPredicates()
    • Method Detail

      • withTag

        public static java.util.function.Predicate<org.openstack4j.model.compute.Server> withTag​(java.lang.String tag,
                                                                                                 java.lang.String tagValue)
        Creates a Predicate that checks Server instances for the existence of a given meta data tag.

        The predicate will return true for all Server instances with a given tag value in its user meta data.

        Parameters:
        tag - The meta data tag.
        value - The expected value of the meta data tag.
        Returns:
        A predicate that returns true for Server instances with the given tag value and false for all other Server instances.
      • withStateIn

        public static java.util.function.Predicate<? super org.openstack4j.model.compute.Server> withStateIn​(org.openstack4j.model.compute.Server.Status... statuses)
        Creates a Predicate function that returns true for any Server with a status in a set of allowed values.
        Parameters:
        statuses - The allowed server Server.Statuses.
        Returns:
        A predicate that returns true for Server instances in a certain state.