Class ImmutableCatalogService.Builder

  • Enclosing class:
    ImmutableCatalogService

    @NotThreadSafe
    public static final class ImmutableCatalogService.Builder
    extends java.lang.Object
    Builds instances of type ImmutableCatalogService. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder from​(CatalogService instance)
        Fill a builder with attribute values from the provided CatalogService instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • node

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder node​(java.lang.String node)
        Initializes the value for the node attribute.
        Parameters:
        node - The value for node
        Returns:
        this builder for use in a chained invocation
      • address

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder address​(java.lang.String address)
        Initializes the value for the address attribute.
        Parameters:
        address - The value for address
        Returns:
        this builder for use in a chained invocation
      • datacenter

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder datacenter​(java.lang.String datacenter)
        Initializes the optional value datacenter to datacenter.
        Parameters:
        datacenter - The value for datacenter
        Returns:
        this builder for chained invocation
      • datacenter

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder datacenter​(java.util.Optional<java.lang.String> datacenter)
        Initializes the optional value datacenter to datacenter.
        Parameters:
        datacenter - The value for datacenter
        Returns:
        this builder for use in a chained invocation
      • serviceName

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceName​(java.lang.String serviceName)
        Initializes the value for the serviceName attribute.
        Parameters:
        serviceName - The value for serviceName
        Returns:
        this builder for use in a chained invocation
      • serviceId

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceId​(java.lang.String serviceId)
        Initializes the value for the serviceId attribute.
        Parameters:
        serviceId - The value for serviceId
        Returns:
        this builder for use in a chained invocation
      • serviceAddress

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceAddress​(java.lang.String serviceAddress)
        Initializes the value for the serviceAddress attribute.
        Parameters:
        serviceAddress - The value for serviceAddress
        Returns:
        this builder for use in a chained invocation
      • serviceEnableTagOverride

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceEnableTagOverride​(boolean serviceEnableTagOverride)
        Initializes the optional value serviceEnableTagOverride to serviceEnableTagOverride.
        Parameters:
        serviceEnableTagOverride - The value for serviceEnableTagOverride
        Returns:
        this builder for chained invocation
      • serviceEnableTagOverride

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceEnableTagOverride​(java.util.Optional<java.lang.Boolean> serviceEnableTagOverride)
        Initializes the optional value serviceEnableTagOverride to serviceEnableTagOverride.
        Parameters:
        serviceEnableTagOverride - The value for serviceEnableTagOverride
        Returns:
        this builder for use in a chained invocation
      • servicePort

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder servicePort​(int servicePort)
        Initializes the value for the servicePort attribute.
        Parameters:
        servicePort - The value for servicePort
        Returns:
        this builder for use in a chained invocation
      • addServiceTags

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder addServiceTags​(java.lang.String element)
        Adds one element to serviceTags list.
        Parameters:
        element - A serviceTags element
        Returns:
        this builder for use in a chained invocation
      • addServiceTags

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder addServiceTags​(java.lang.String... elements)
        Adds elements to serviceTags list.
        Parameters:
        elements - An array of serviceTags elements
        Returns:
        this builder for use in a chained invocation
      • serviceTags

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceTags​(java.lang.Iterable<java.lang.String> elements)
        Sets or replaces all elements for serviceTags list.
        Parameters:
        elements - An iterable of serviceTags elements
        Returns:
        this builder for use in a chained invocation
      • addAllServiceTags

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder addAllServiceTags​(java.lang.Iterable<java.lang.String> elements)
        Adds elements to serviceTags list.
        Parameters:
        elements - An iterable of serviceTags elements
        Returns:
        this builder for use in a chained invocation
      • putServiceMeta

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder putServiceMeta​(java.lang.String key,
                                                                    java.lang.String value)
        Put one entry to the serviceMeta map.
        Parameters:
        key - The key in the serviceMeta map
        value - The associated value in the serviceMeta map
        Returns:
        this builder for use in a chained invocation
      • putServiceMeta

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder putServiceMeta​(java.util.Map.Entry<java.lang.String,​? extends java.lang.String> entry)
        Put one entry to the serviceMeta map. Nulls are not permitted
        Parameters:
        entry - The key and value entry
        Returns:
        this builder for use in a chained invocation
      • serviceMeta

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceMeta​(java.util.Map<java.lang.String,​? extends java.lang.String> entries)
        Sets or replaces all mappings from the specified map as entries for the serviceMeta map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the serviceMeta map
        Returns:
        this builder for use in a chained invocation
      • putAllServiceMeta

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder putAllServiceMeta​(java.util.Map<java.lang.String,​? extends java.lang.String> entries)
        Put all mappings from the specified map as entries to serviceMeta map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the serviceMeta map
        Returns:
        this builder for use in a chained invocation
      • serviceWeights

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceWeights​(ServiceWeights serviceWeights)
        Initializes the optional value serviceWeights to serviceWeights.
        Parameters:
        serviceWeights - The value for serviceWeights
        Returns:
        this builder for chained invocation
      • serviceWeights

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder serviceWeights​(java.util.Optional<? extends ServiceWeights> serviceWeights)
        Initializes the optional value serviceWeights to serviceWeights.
        Parameters:
        serviceWeights - The value for serviceWeights
        Returns:
        this builder for use in a chained invocation
      • putNodeMeta

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder putNodeMeta​(java.lang.String key,
                                                                 java.lang.String value)
        Put one entry to the nodeMeta map.
        Parameters:
        key - The key in the nodeMeta map
        value - The associated value in the nodeMeta map
        Returns:
        this builder for use in a chained invocation
      • putNodeMeta

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder putNodeMeta​(java.util.Map.Entry<java.lang.String,​? extends java.lang.String> entry)
        Put one entry to the nodeMeta map. Nulls are not permitted
        Parameters:
        entry - The key and value entry
        Returns:
        this builder for use in a chained invocation
      • nodeMeta

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder nodeMeta​(java.util.Map<java.lang.String,​? extends java.lang.String> entries)
        Sets or replaces all mappings from the specified map as entries for the nodeMeta map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the nodeMeta map
        Returns:
        this builder for use in a chained invocation
      • putAllNodeMeta

        @CanIgnoreReturnValue
        public final ImmutableCatalogService.Builder putAllNodeMeta​(java.util.Map<java.lang.String,​? extends java.lang.String> entries)
        Put all mappings from the specified map as entries to nodeMeta map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the nodeMeta map
        Returns:
        this builder for use in a chained invocation