public final class ImmutableMongodConfig extends Object implements MongodConfig
MongodConfig.
Use the builder to create immutable instances:
ImmutableMongodConfig.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableMongodConfig.Builder
Builds instances of type
ImmutableMongodConfig. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
args() |
static ImmutableMongodConfig.Builder |
builder()
Creates a builder for
ImmutableMongodConfig. |
MongoCmdOptions |
cmdOptions() |
static ImmutableMongodConfig |
copyOf(MongodConfig instance)
Creates an immutable copy of a
MongodConfig value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableMongodConfig that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
stopTimeoutInMillis, version, timeout, net, cmdOptions, password, userName, replication, isConfigServer, isShardServer, processListener, params, args, pidFile, supportConfig. |
boolean |
isConfigServer() |
boolean |
isShardServer() |
Net |
net() |
Map<String,String> |
params() |
String |
password() |
String |
pidFile() |
IMongoProcessListener |
processListener() |
Storage |
replication() |
OptionalLong |
stopTimeoutInMillis() |
de.flapdoodle.embed.process.config.SupportConfig |
supportConfig() |
Timeout |
timeout() |
String |
toString()
Prints the immutable value
MongodConfig with attribute values. |
String |
userName() |
IFeatureAwareVersion |
version() |
ImmutableMongodConfig |
withArgs(Map<String,? extends String> entries)
Copy the current immutable object by replacing the
args map with the specified map. |
ImmutableMongodConfig |
withCmdOptions(MongoCmdOptions value)
Copy the current immutable object by setting a value for the
cmdOptions attribute. |
ImmutableMongodConfig |
withIsConfigServer(boolean value)
Copy the current immutable object by setting a value for the
isConfigServer attribute. |
ImmutableMongodConfig |
withIsShardServer(boolean value)
Copy the current immutable object by setting a value for the
isShardServer attribute. |
ImmutableMongodConfig |
withNet(Net value)
Copy the current immutable object by setting a value for the
net attribute. |
ImmutableMongodConfig |
withParams(Map<String,? extends String> entries)
Copy the current immutable object by replacing the
params map with the specified map. |
ImmutableMongodConfig |
withPassword(String value)
Copy the current immutable object by setting a value for the
password attribute. |
ImmutableMongodConfig |
withPidFile(String value)
Copy the current immutable object by setting a value for the
pidFile attribute. |
ImmutableMongodConfig |
withProcessListener(IMongoProcessListener value)
Copy the current immutable object by setting a value for the
processListener attribute. |
ImmutableMongodConfig |
withReplication(Storage value)
Copy the current immutable object by setting a value for the
replication attribute. |
ImmutableMongodConfig |
withStopTimeoutInMillis(long value)
Copy the current immutable object by setting a present value for the optional
stopTimeoutInMillis attribute. |
ImmutableMongodConfig |
withStopTimeoutInMillis(OptionalLong optional)
Copy the current immutable object by setting an optional value for the
stopTimeoutInMillis attribute. |
ImmutableMongodConfig |
withSupportConfig(de.flapdoodle.embed.process.config.SupportConfig value)
Copy the current immutable object by setting a value for the
supportConfig attribute. |
ImmutableMongodConfig |
withTimeout(Timeout value)
Copy the current immutable object by setting a value for the
timeout attribute. |
ImmutableMongodConfig |
withUserName(String value)
Copy the current immutable object by setting a value for the
userName attribute. |
ImmutableMongodConfig |
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 Storage replication()
replication in interface MongodConfigreplication attributepublic boolean isConfigServer()
isConfigServer in interface MongodConfigisConfigServer attributepublic boolean isShardServer()
isShardServer in interface MongodConfigisShardServer attributepublic IMongoProcessListener processListener()
processListener in interface MongodConfigprocessListener attributepublic Map<String,String> params()
params in interface MongodConfigparams attributepublic Map<String,String> args()
args in interface MongodConfigargs attributepublic String pidFile()
pidFile in interface MongoCommonConfigpidFile in interface MongodConfigpidFile attributepublic de.flapdoodle.embed.process.config.SupportConfig supportConfig()
supportConfig in interface MongodConfigsupportConfig in interface de.flapdoodle.embed.process.config.ExecutableProcessConfigsupportConfig attributepublic final ImmutableMongodConfig withStopTimeoutInMillis(long value)
stopTimeoutInMillis attribute.value - The value for stopTimeoutInMillisthis objectpublic final ImmutableMongodConfig 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 ImmutableMongodConfig 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 ImmutableMongodConfig 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 ImmutableMongodConfig 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 ImmutableMongodConfig 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 ImmutableMongodConfig 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 ImmutableMongodConfig 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 ImmutableMongodConfig withReplication(Storage value)
replication attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for replicationthis objectpublic final ImmutableMongodConfig withIsConfigServer(boolean value)
isConfigServer attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for isConfigServerthis objectpublic final ImmutableMongodConfig withIsShardServer(boolean value)
isShardServer attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for isShardServerthis objectpublic final ImmutableMongodConfig withProcessListener(IMongoProcessListener value)
processListener attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for processListenerthis objectpublic final ImmutableMongodConfig withParams(Map<String,? extends String> entries)
params 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 params mapthis objectpublic final ImmutableMongodConfig 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 ImmutableMongodConfig 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 ImmutableMongodConfig 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)
ImmutableMongodConfig that have equal attribute values.public int hashCode()
stopTimeoutInMillis, version, timeout, net, cmdOptions, password, userName, replication, isConfigServer, isShardServer, processListener, params, args, pidFile, supportConfig.public String toString()
MongodConfig with attribute values.public static ImmutableMongodConfig copyOf(MongodConfig instance)
MongodConfig 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 ImmutableMongodConfig.Builder builder()
ImmutableMongodConfig.
ImmutableMongodConfig.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
.replication(de.flapdoodle.embed.mongo.config.Storage) // optional replication
.isConfigServer(boolean) // optional isConfigServer
.isShardServer(boolean) // optional isShardServer
.processListener(de.flapdoodle.embed.mongo.config.processlistener.IMongoProcessListener) // optional processListener
.putParams|putAllParams(String => String) // params mappings
.putArgs|putAllArgs(String => String) // args mappings
.pidFile(String) // optional pidFile
.supportConfig(de.flapdoodle.embed.process.config.SupportConfig) // optional supportConfig
.build();
builder in interface MongodConfigCopyright © 2021. All rights reserved.