public static final class ImmutableMongoCmdOptions.Builder extends Object
ImmutableMongoCmdOptions.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableMongoCmdOptions.Builder |
auth(boolean auth)
Initializes the value for the
auth attribute. |
ImmutableMongoCmdOptions |
build()
Builds a new
ImmutableMongoCmdOptions. |
ImmutableMongoCmdOptions.Builder |
enableTextSearch(boolean enableTextSearch)
Initializes the value for the
enableTextSearch attribute. |
ImmutableMongoCmdOptions.Builder |
from(MongoCmdOptions instance)
Fill a builder with attribute values from the provided
MongoCmdOptions instance. |
ImmutableMongoCmdOptions.Builder |
isVerbose(boolean isVerbose)
Initializes the value for the
isVerbose attribute. |
ImmutableMongoCmdOptions.Builder |
master(boolean master)
Initializes the value for the
master attribute. |
ImmutableMongoCmdOptions.Builder |
storageEngine(Optional<String> storageEngine)
Initializes the optional value
storageEngine to storageEngine. |
ImmutableMongoCmdOptions.Builder |
storageEngine(String storageEngine)
Initializes the optional value
storageEngine to storageEngine. |
ImmutableMongoCmdOptions.Builder |
syncDelay(int syncDelay)
Initializes the value for the
syncDelay attribute. |
ImmutableMongoCmdOptions.Builder |
useDefaultSyncDelay(boolean useDefaultSyncDelay)
Initializes the value for the
useDefaultSyncDelay attribute. |
ImmutableMongoCmdOptions.Builder |
useNoJournal(boolean useNoJournal)
Initializes the value for the
useNoJournal attribute. |
ImmutableMongoCmdOptions.Builder |
useNoPrealloc(boolean useNoPrealloc)
Initializes the value for the
useNoPrealloc attribute. |
ImmutableMongoCmdOptions.Builder |
useSmallFiles(boolean useSmallFiles)
Initializes the value for the
useSmallFiles attribute. |
public final ImmutableMongoCmdOptions.Builder from(MongoCmdOptions instance)
MongoCmdOptions instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder syncDelay(int syncDelay)
syncDelay attribute.
If not set, this attribute will have a default value as returned by the initializer of syncDelay.
syncDelay - The value for syncDelaythis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder useDefaultSyncDelay(boolean useDefaultSyncDelay)
useDefaultSyncDelay attribute.
If not set, this attribute will have a default value as returned by the initializer of useDefaultSyncDelay.
useDefaultSyncDelay - The value for useDefaultSyncDelaythis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder storageEngine(String storageEngine)
storageEngine to storageEngine.storageEngine - The value for storageEnginethis builder for chained invocationpublic final ImmutableMongoCmdOptions.Builder storageEngine(Optional<String> storageEngine)
storageEngine to storageEngine.storageEngine - The value for storageEnginethis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder isVerbose(boolean isVerbose)
isVerbose attribute.
If not set, this attribute will have a default value as returned by the initializer of isVerbose.
isVerbose - The value for isVerbosethis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder useNoPrealloc(boolean useNoPrealloc)
useNoPrealloc attribute.
If not set, this attribute will have a default value as returned by the initializer of useNoPrealloc.
useNoPrealloc - The value for useNoPreallocthis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder useSmallFiles(boolean useSmallFiles)
useSmallFiles attribute.
If not set, this attribute will have a default value as returned by the initializer of useSmallFiles.
useSmallFiles - The value for useSmallFilesthis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder useNoJournal(boolean useNoJournal)
useNoJournal attribute.
If not set, this attribute will have a default value as returned by the initializer of useNoJournal.
useNoJournal - The value for useNoJournalthis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder enableTextSearch(boolean enableTextSearch)
enableTextSearch attribute.
If not set, this attribute will have a default value as returned by the initializer of enableTextSearch.
enableTextSearch - The value for enableTextSearchthis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder auth(boolean auth)
auth attribute.
If not set, this attribute will have a default value as returned by the initializer of auth.
auth - The value for auththis builder for use in a chained invocationpublic final ImmutableMongoCmdOptions.Builder master(boolean master)
master attribute.
If not set, this attribute will have a default value as returned by the initializer of master.
master - The value for masterthis builder for use in a chained invocationpublic ImmutableMongoCmdOptions build()
ImmutableMongoCmdOptions.IllegalStateException - if any required attributes are missingCopyright © 2021. All rights reserved.