22.39. Class MongoDB

Namespace: ArmoniK.Core.Adapters.MongoDB.Options
Assembly: ArmoniK.Core.Adapters.MongoDB.dll

Represents the configuration settings for connecting to a MongoDB database.

[PublicAPI]
[ExtractDocumentation("Options for MongoDB")]
public class MongoDB

22.39.1. Inheritance

objectMongoDB

22.39.2. Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

22.39.3. Fields

22.39.3.1. SettingSection

The name of the configuration section for MongoDB settings.

public const string SettingSection = "MongoDB"

22.39.3.1.1. Field Value

string

22.39.4. Properties

22.39.4.1. AllowInsecureTls

Whether to allow insecure TLS connections.

public bool AllowInsecureTls { get; set; }

22.39.4.1.1. Property Value

bool

22.39.4.2. AuthSource

Authentication source for the MongoDB connection.

public string AuthSource { get; set; }

22.39.4.2.1. Property Value

string

22.39.4.3. CAFile

Path to the Certificate Authority (CA) file for TLS connections.

public string CAFile { get; set; }

22.39.4.3.1. Property Value

string

22.39.4.4. ConnectionString

Connection string for the MongoDB server. If not null or empty, the MongoClientSettings are derived from it. Other connection options like Host, Port, User, Password and DataBaseName are ignored in this case. That is, the connection options provided in the ConnectionString take precedence over the connection options defined in this class.

public string ConnectionString { get; set; }

22.39.4.4.1. Property Value

string

22.39.4.5. CredentialsPath

Path to the credentials file for authentication.

public string CredentialsPath { get; set; }

22.39.4.5.1. Property Value

string

22.39.4.6. DataRetention

Duration for which data should be retained in the database.

public TimeSpan DataRetention { get; set; }

22.39.4.6.1. Property Value

TimeSpan

22.39.4.7. DatabaseName

Name of the database to connect to.

public string DatabaseName { get; set; }

22.39.4.7.1. Property Value

string

22.39.4.8. DirectConnection

Whether to connect directly to the MongoDB server, bypassing the replica set.

public bool DirectConnection { get; set; }

22.39.4.8.1. Property Value

bool

22.39.4.9. Host

Hostname of the MongoDB server.

public string Host { get; set; }

22.39.4.9.1. Property Value

string

22.39.4.10. MaxConnectionPoolSize

Maximum size of the connection pool.

public int MaxConnectionPoolSize { get; set; }

22.39.4.10.1. Property Value

int

22.39.4.11. MaxRetries

Maximum number of retry attempts for failed operations.

public int MaxRetries { get; set; }

22.39.4.11.1. Property Value

int

22.39.4.12. Password

Password for connecting to the MongoDB server.

public string Password { get; set; }

22.39.4.12.1. Property Value

string

22.39.4.13. Port

Port number for the MongoDB server connection.

public int Port { get; set; }

22.39.4.13.1. Property Value

int

22.39.4.14. ReplicaSet

Name of the replica set to connect to.

public string ReplicaSet { get; set; }

22.39.4.14.1. Property Value

string

22.39.4.15. ServerSelectionTimeout

Timeout duration for server selection.

public TimeSpan ServerSelectionTimeout { get; set; }

22.39.4.15.1. Property Value

TimeSpan

22.39.4.16. Sharding

Whether sharding is enabled for the database.

public bool Sharding { get; set; }

22.39.4.16.1. Property Value

bool

22.39.4.17. TableStorage

Table storage configuration.

public TableStorage TableStorage { get; set; }

22.39.4.17.1. Property Value

TableStorage

22.39.4.18. Tls

Whether to use TLS for the connection.

public bool Tls { get; set; }

22.39.4.18.1. Property Value

bool

22.39.4.19. User

Username for connecting to the MongoDB server.

public string User { get; set; }

22.39.4.19.1. Property Value

string