Class ConfigSourceSet

  • All Implemented Interfaces:
    ConfigSource

    @Deprecated(forRemoval=true,
                since="7")
    public class ConfigSourceSet
    extends Object
    implements ConfigSource
    Deprecated, for removal: This API element is subject to removal in a future version.
    Will be removed in Vespa 8. Only for internal use.
    An immutable set of connection endpoints, where each endpoint points to either a remote config server or a config proxy. Two sets are said to be equal if they contain the same sources, independent of order, upper/lower-casing and whitespaces.
    Author:
    gjoranv
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfigSourceSet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an empty ConfigSourceSet, mostly used for unit testing.
      ConfigSourceSet​(String address)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Convenience constructor to create a ConfigSourceSet with only one input address.
      ConfigSourceSet​(String[] addresses)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a ConfigSourceSet containing all the unique given input addresses.
      ConfigSourceSet​(List<String> addresses)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a ConfigSourceSet containing all the unique given input addresses.
    • Constructor Detail

      • ConfigSourceSet

        public ConfigSourceSet()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates an empty ConfigSourceSet, mostly used for unit testing.
      • ConfigSourceSet

        public ConfigSourceSet​(List<String> addresses)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a ConfigSourceSet containing all the unique given input addresses. Each address is trimmed and lower-cased before adding.
        Parameters:
        addresses - Connection endpoints on the format "tcp/host:port".
      • ConfigSourceSet

        public ConfigSourceSet​(String[] addresses)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a ConfigSourceSet containing all the unique given input addresses. Each address is trimmed and lower-cased before adding.
        Parameters:
        addresses - Connection endpoints on the format "tcp/host:port".
      • ConfigSourceSet

        public ConfigSourceSet​(String address)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Convenience constructor to create a ConfigSourceSet with only one input address.
        Parameters:
        address - Connection endpoint on the format "tcp/host:port".
    • Method Detail

      • getSources

        public Set<String> getSources()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns an unmodifiable set containing all sources in this ConfigSourceSet. Iteration order is guaranteed to be the same as that of the list or array that was given when this set was created.
        Returns:
        All sources in this ConfigSourceSet.
      • equals

        public boolean equals​(Object o)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        toString in class Object
      • createDefault

        public static ConfigSourceSet createDefault()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Create a new source set using the environment variables or system properties
        Returns:
        a new source set if available, null if not.