Class ImmutableThenaConfig.Builder

java.lang.Object
io.resys.hdes.client.spi.store.ImmutableThenaConfig.Builder
Enclosing class:
ImmutableThenaConfig

@NotThreadSafe public static final class ImmutableThenaConfig.Builder extends Object
Builds instances of type ImmutableThenaConfig. 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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableThenaConfig.Builder from(ThenaConfig instance)
      Fill a builder with attribute values from the provided ThenaConfig instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • client

      @CanIgnoreReturnValue public final ImmutableThenaConfig.Builder client(ThenaClient client)
      Initializes the value for the client attribute.
      Parameters:
      client - The value for client
      Returns:
      this builder for use in a chained invocation
    • repoName

      @CanIgnoreReturnValue public final ImmutableThenaConfig.Builder repoName(String repoName)
      Initializes the value for the repoName attribute.
      Parameters:
      repoName - The value for repoName
      Returns:
      this builder for use in a chained invocation
    • headName

      @CanIgnoreReturnValue public final ImmutableThenaConfig.Builder headName(String headName)
      Initializes the value for the headName attribute.
      Parameters:
      headName - The value for headName
      Returns:
      this builder for use in a chained invocation
    • authorProvider

      @CanIgnoreReturnValue public final ImmutableThenaConfig.Builder authorProvider(ThenaConfig.AuthorProvider authorProvider)
      Initializes the value for the authorProvider attribute.
      Parameters:
      authorProvider - The value for authorProvider
      Returns:
      this builder for use in a chained invocation
    • gidProvider

      @CanIgnoreReturnValue public final ImmutableThenaConfig.Builder gidProvider(ThenaConfig.GidProvider gidProvider)
      Initializes the value for the gidProvider attribute.
      Parameters:
      gidProvider - The value for gidProvider
      Returns:
      this builder for use in a chained invocation
    • serializer

      @CanIgnoreReturnValue public final ImmutableThenaConfig.Builder serializer(ThenaConfig.Serializer serializer)
      Initializes the value for the serializer attribute.
      Parameters:
      serializer - The value for serializer
      Returns:
      this builder for use in a chained invocation
    • deserializer

      @CanIgnoreReturnValue public final ImmutableThenaConfig.Builder deserializer(ThenaConfig.Deserializer deserializer)
      Initializes the value for the deserializer attribute.
      Parameters:
      deserializer - The value for deserializer
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableThenaConfig build()
      Builds a new ImmutableThenaConfig.
      Returns:
      An immutable instance of ThenaConfig
      Throws:
      IllegalStateException - if any required attributes are missing