Package com.yahoo.config.provision
Class HostFilter
java.lang.Object
com.yahoo.config.provision.HostFilter
A filter which matches a host depending on its properties.
- Author:
- bratseth
-
Method Summary
Modifier and TypeMethodDescriptionstatic HostFilter
all()
Returns a filter which matches all hostsstatic HostFilter
clusterId
(ClusterSpec.Id clusterId) Returns a filter which matches a given cluster id onlystatic HostFilter
clusterType
(ClusterSpec.Type clusterType) Returns a filter which matches a given cluster type onlyboolean
static HostFilter
Returns a filter which matches a given flavor onlystatic HostFilter
Returns a host filter from three comma and-or space separated string lists.static HostFilter
from
(Collection<String> hostNames) Returns a host filter filtering only on hostnamesstatic HostFilter
from
(Collection<String> hostNames, Collection<String> flavors, Collection<ClusterSpec.Type> clusterTypes, Collection<ClusterSpec.Id> clusterIds) Returns a host filter from three optional conditionsint
hashCode()
static HostFilter
Returns a filter which matches a given host onlyboolean
matches
(String hostname, String flavor, Optional<ClusterMembership> membership) Returns true if this filter matches the given host properties
-
Method Details
-
matches
Returns true if this filter matches the given host properties -
all
Returns a filter which matches all hosts -
hostname
Returns a filter which matches a given host only -
flavor
Returns a filter which matches a given flavor only -
clusterType
Returns a filter which matches a given cluster type only -
clusterId
Returns a filter which matches a given cluster id only -
from
public static HostFilter from(Collection<String> hostNames, Collection<String> flavors, Collection<ClusterSpec.Type> clusterTypes, Collection<ClusterSpec.Id> clusterIds) Returns a host filter from three optional conditions -
from
public static HostFilter from(String hostNames, String flavors, String clusterTypes, String clusterIds) Returns a host filter from three comma and-or space separated string lists. The strings may be null or empty. -
from
Returns a host filter filtering only on hostnames -
equals
-
hashCode
public int hashCode()
-