public static final class ImmutableStorage.Builder extends Object
ImmutableStorage.
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 |
|---|---|
ImmutableStorage |
build()
Builds a new
ImmutableStorage. |
ImmutableStorage.Builder |
from(Storage instance)
Fill a builder with attribute values from the provided
Storage instance. |
ImmutableStorage.Builder |
oplogSize(int oplogSize)
Initializes the value for the
oplogSize attribute. |
ImmutableStorage.Builder |
replSetName(String replSetName)
Initializes the value for the
replSetName attribute. |
public final ImmutableStorage.Builder from(Storage instance)
Storage 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 ImmutableStorage.Builder oplogSize(int oplogSize)
oplogSize attribute.
If not set, this attribute will have a default value as returned by the initializer of oplogSize.
oplogSize - The value for oplogSizethis builder for use in a chained invocationpublic final ImmutableStorage.Builder replSetName(String replSetName)
replSetName attribute.replSetName - The value for replSetNamethis builder for use in a chained invocationpublic ImmutableStorage build()
ImmutableStorage.IllegalStateException - if any required attributes are missingCopyright © 2022. All rights reserved.