Package io.dialob.client.spi.store
Class ImmutableDialobStoreConfig.Builder
- java.lang.Object
-
- io.dialob.client.spi.store.ImmutableDialobStoreConfig.Builder
-
- Enclosing class:
- ImmutableDialobStoreConfig
@NotThreadSafe public static final class ImmutableDialobStoreConfig.Builder extends Object
Builds instances of typeImmutableDialobStoreConfig. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableDialobStoreConfig.Builder from(DialobStoreConfig instance)
Fill a builder with attribute values from the providedDialobStoreConfiginstance. 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
@CanIgnoreReturnValue public final ImmutableDialobStoreConfig.Builder client(io.resys.thena.docdb.api.DocDB client)
Initializes the value for theclientattribute.- Parameters:
client- The value for client- Returns:
thisbuilder for use in a chained invocation
-
repoName
@CanIgnoreReturnValue public final ImmutableDialobStoreConfig.Builder repoName(String repoName)
Initializes the value for therepoNameattribute.- Parameters:
repoName- The value for repoName- Returns:
thisbuilder for use in a chained invocation
-
headName
@CanIgnoreReturnValue public final ImmutableDialobStoreConfig.Builder headName(String headName)
Initializes the value for theheadNameattribute.- Parameters:
headName- The value for headName- Returns:
thisbuilder for use in a chained invocation
-
authorProvider
@CanIgnoreReturnValue public final ImmutableDialobStoreConfig.Builder authorProvider(DialobStoreConfig.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 ImmutableDialobStoreConfig.Builder gidProvider(DialobStoreConfig.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 ImmutableDialobStoreConfig.Builder serializer(DialobStoreConfig.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 ImmutableDialobStoreConfig.Builder deserializer(DialobStoreConfig.Deserializer deserializer)
Initializes the value for thedeserializerattribute.- Parameters:
deserializer- The value for deserializer- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDialobStoreConfig build()
Builds a newImmutableDialobStoreConfig.- Returns:
- An immutable instance of DialobStoreConfig
- Throws:
IllegalStateException- if any required attributes are missing
-
-