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 HostFilterall()Returns a filter which matches all hostsstatic HostFilterclusterId(ClusterSpec.Id clusterId) Returns a filter which matches a given cluster id onlystatic HostFilterclusterType(ClusterSpec.Type clusterType) Returns a filter which matches a given cluster type onlybooleanstatic HostFilterReturns a filter which matches a given flavor onlystatic HostFilterReturns a host filter from three comma and-or space separated string lists.static HostFilterfrom(Collection<String> hostNames) Returns a host filter filtering only on hostnamesstatic HostFilterfrom(Collection<String> hostNames, Collection<String> flavors, Collection<ClusterSpec.Type> clusterTypes, Collection<ClusterSpec.Id> clusterIds) Returns a host filter from three optional conditionsinthashCode()static HostFilterReturns a filter which matches a given host onlybooleanmatches(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()
-