public final class ImmutableMongosConfig extends Object implements MongosConfig
MongosConfig.
Use the builder to create immutable instances:
ImmutableMongosConfig.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableMongosConfig.Builder
Builds instances of type
ImmutableMongosConfig. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
args() |
static ImmutableMongosConfig.Builder |
builder()
Creates a builder for
ImmutableMongosConfig. |
MongoCmdOptions |
cmdOptions() |
static ImmutableMongosConfig |
copyOf(MongosConfig instance)
Creates an immutable copy of a
MongosConfig value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableMongosConfig that have equal attribute values. |
String |
getConfigDB() |
int |
hashCode()
Computes a hash code from attributes:
stopTimeoutInMillis, version, timeout, net, cmdOptions, password, userName, configDB, replicaSet, args, pidFile, supportConfig. |
Net |
net() |
String |
password() |
String |
pidFile() |
String |
replicaSet() |
OptionalLong |
stopTimeoutInMillis() |
de.flapdoodle.embed.process.config.SupportConfig |
supportConfig() |
Timeout |
timeout() |
String |
toString()
Prints the immutable value
MongosConfig with attribute values. |
String |
userName() |
IFeatureAwareVersion |
version() |
ImmutableMongosConfig |
withArgs(Map<String,? extends String> entries)
Copy the current immutable object by replacing the
args map with the specified map. |
ImmutableMongosConfig |
withCmdOptions(MongoCmdOptions value)
Copy the current immutable object by setting a value for the
cmdOptions attribute. |
ImmutableMongosConfig |
withConfigDB(String value)
Copy the current immutable object by setting a value for the
configDB attribute. |
ImmutableMongosConfig |
withNet(Net value)
Copy the current immutable object by setting a value for the
net attribute. |
ImmutableMongosConfig |
withPassword(String value)
Copy the current immutable object by setting a value for the
password attribute. |
ImmutableMongosConfig |
withPidFile(String value)
Copy the current immutable object by setting a value for the
pidFile attribute. |
ImmutableMongosConfig |
withReplicaSet(String value)
Copy the current immutable object by setting a value for the
replicaSet attribute. |
ImmutableMongosConfig |
withStopTimeoutInMillis(long value)
Copy the current immutable object by setting a present value for the optional
stopTimeoutInMillis attribute. |
ImmutableMongosConfig |
withStopTimeoutInMillis(OptionalLong optional)
Copy the current immutable object by setting an optional value for the
stopTimeoutInMillis attribute. |
ImmutableMongosConfig |
withSupportConfig(de.flapdoodle.embed.process.config.SupportConfig value)
Copy the current immutable object by setting a value for the
supportConfig attribute. |
ImmutableMongosConfig |
withTimeout(Timeout value)
Copy the current immutable object by setting a value for the
timeout attribute. |
ImmutableMongosConfig |
withUserName(String value)
Copy the current immutable object by setting a value for the
userName attribute. |
ImmutableMongosConfig |
withVersion(IFeatureAwareVersion value)
Copy the current immutable object by setting a value for the
version attribute. |
public OptionalLong stopTimeoutInMillis()
stopTimeoutInMillis in interface de.flapdoodle.embed.process.config.ExecutableProcessConfigstopTimeoutInMillis attributepublic IFeatureAwareVersion version()
version in interface MongoCommonConfigversion in interface de.flapdoodle.embed.process.config.ExecutableProcessConfigversion attributepublic Timeout timeout()
timeout in interface MongoCommonConfigtimeout attributepublic Net net()
net in interface MongoCommonConfignet attributepublic MongoCmdOptions cmdOptions()
cmdOptions in interface MongoCommonConfigcmdOptions attributepublic String password()
password in interface MongoCommonConfigpassword attributepublic String userName()
userName in interface MongoCommonConfiguserName attributepublic String getConfigDB()
getConfigDB in interface MongosConfigconfigDB attributepublic String replicaSet()
replicaSet in interface MongosConfigreplicaSet attributepublic Map<String,String> args()
args in interface MongosConfigargs attributepublic String pidFile()
pidFile in interface MongoCommonConfigpidFile in interface MongosConfigpidFile attributepublic de.flapdoodle.embed.process.config.SupportConfig supportConfig()
supportConfig in interface MongosConfigsupportConfig in interface de.flapdoodle.embed.process.config.ExecutableProcessConfigsupportConfig attributepublic final ImmutableMongosConfig withStopTimeoutInMillis(long value)
stopTimeoutInMillis attribute.value - The value for stopTimeoutInMillisthis objectpublic final ImmutableMongosConfig withStopTimeoutInMillis(OptionalLong optional)
stopTimeoutInMillis attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for stopTimeoutInMillisthis objectpublic final ImmutableMongosConfig withVersion(IFeatureAwareVersion value)
version attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for versionthis objectpublic final ImmutableMongosConfig withTimeout(Timeout value)
timeout attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for timeoutthis objectpublic final ImmutableMongosConfig withNet(Net value)
net attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for netthis objectpublic final ImmutableMongosConfig withCmdOptions(MongoCmdOptions value)
cmdOptions attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for cmdOptionsthis objectpublic final ImmutableMongosConfig withPassword(String value)
password attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for passwordthis objectpublic final ImmutableMongosConfig withUserName(String value)
userName attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for userNamethis objectpublic final ImmutableMongosConfig withConfigDB(String value)
configDB attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for configDBthis objectpublic final ImmutableMongosConfig withReplicaSet(String value)
replicaSet attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for replicaSetthis objectpublic final ImmutableMongosConfig withArgs(Map<String,? extends String> entries)
args map with the specified map.
Nulls are not permitted as keys or values.
A shallow reference equality check is used to prevent copying of the same value by returning this.entries - The entries to be added to the args mapthis objectpublic final ImmutableMongosConfig withPidFile(String value)
pidFile attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for pidFilethis objectpublic final ImmutableMongosConfig withSupportConfig(de.flapdoodle.embed.process.config.SupportConfig value)
supportConfig attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for supportConfigthis objectpublic boolean equals(Object another)
ImmutableMongosConfig that have equal attribute values.public int hashCode()
stopTimeoutInMillis, version, timeout, net, cmdOptions, password, userName, configDB, replicaSet, args, pidFile, supportConfig.public String toString()
MongosConfig with attribute values.public static ImmutableMongosConfig copyOf(MongosConfig instance)
MongosConfig value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableMongosConfig.Builder builder()
ImmutableMongosConfig.
ImmutableMongosConfig.builder()
.stopTimeoutInMillis(long) // optional stopTimeoutInMillis
.version(de.flapdoodle.embed.mongo.distribution.IFeatureAwareVersion) // required version
.timeout(de.flapdoodle.embed.mongo.config.Timeout) // optional timeout
.net(de.flapdoodle.embed.mongo.config.Net) // optional net
.cmdOptions(de.flapdoodle.embed.mongo.config.MongoCmdOptions) // optional cmdOptions
.password(String) // optional password
.userName(String) // optional userName
.configDB(String) // required configDB
.replicaSet(String) // optional replicaSet
.putArgs|putAllArgs(String => String) // args mappings
.pidFile(String) // optional pidFile
.supportConfig(de.flapdoodle.embed.process.config.SupportConfig) // optional supportConfig
.build();
builder in interface MongosConfigCopyright © 2022. All rights reserved.