Package io.resys.hdes.client.spi.store
Class ImmutableThenaConfig.Builder
java.lang.Object
io.resys.hdes.client.spi.store.ImmutableThenaConfig.Builder
- Enclosing class:
- ImmutableThenaConfig
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 Summary
Modifier and TypeMethodDescriptionauthorProvider(ThenaConfig.AuthorProvider authorProvider) Initializes the value for theauthorProviderattribute.build()Builds a newImmutableThenaConfig.client(ThenaClient client) Initializes the value for theclientattribute.deserializer(ThenaConfig.Deserializer deserializer) Initializes the value for thedeserializerattribute.from(ThenaConfig instance) Fill a builder with attribute values from the providedThenaConfiginstance.gidProvider(ThenaConfig.GidProvider gidProvider) Initializes the value for thegidProviderattribute.Initializes the value for theheadNameattribute.Initializes the value for therepoNameattribute.serializer(ThenaConfig.Serializer serializer) Initializes the value for theserializerattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedThenaConfiginstance. 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:
thisbuilder for use in a chained invocation
-
client
Initializes the value for theclientattribute.- Parameters:
client- The value for client- Returns:
thisbuilder for use in a chained invocation
-
repoName
Initializes the value for therepoNameattribute.- Parameters:
repoName- The value for repoName- Returns:
thisbuilder for use in a chained invocation
-
headName
Initializes the value for theheadNameattribute.- Parameters:
headName- The value for headName- Returns:
thisbuilder for use in a chained invocation
-
authorProvider
@CanIgnoreReturnValue public final ImmutableThenaConfig.Builder authorProvider(ThenaConfig.AuthorProvider authorProvider) Initializes the value for theauthorProviderattribute.- Parameters:
authorProvider- The value for authorProvider- Returns:
thisbuilder for use in a chained invocation
-
gidProvider
@CanIgnoreReturnValue public final ImmutableThenaConfig.Builder gidProvider(ThenaConfig.GidProvider gidProvider) Initializes the value for thegidProviderattribute.- Parameters:
gidProvider- The value for gidProvider- Returns:
thisbuilder for use in a chained invocation
-
serializer
@CanIgnoreReturnValue public final ImmutableThenaConfig.Builder serializer(ThenaConfig.Serializer serializer) Initializes the value for theserializerattribute.- Parameters:
serializer- The value for serializer- Returns:
thisbuilder for use in a chained invocation
-
deserializer
@CanIgnoreReturnValue public final ImmutableThenaConfig.Builder deserializer(ThenaConfig.Deserializer deserializer) Initializes the value for thedeserializerattribute.- Parameters:
deserializer- The value for deserializer- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableThenaConfig.- Returns:
- An immutable instance of ThenaConfig
- Throws:
IllegalStateException- if any required attributes are missing
-