26.40. 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
26.40.1. Inheritance
26.40.2. Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
26.40.3. Fields
26.40.3.1. SettingSection
The name of the configuration section for MongoDB settings.
public const string SettingSection = "MongoDB"
26.40.3.1.1. Field Value
26.40.4. Properties
26.40.4.1. AllowInsecureTls
Whether to allow insecure TLS connections.
public bool AllowInsecureTls { get; set; }
26.40.4.1.1. Property Value
26.40.4.2. AuthSource
Authentication source for the MongoDB connection.
public string AuthSource { get; set; }
26.40.4.2.1. Property Value
26.40.4.3. CAFile
Path to the Certificate Authority (CA) file for TLS connections.
public string CAFile { get; set; }
26.40.4.3.1. Property Value
26.40.4.4. CausalConsistency
Activate causal consistency for MongoDB operations.
public bool? CausalConsistency { get; set; }
26.40.4.4.1. Property Value
bool?
26.40.4.5. 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; }
26.40.4.5.1. Property Value
26.40.4.6. CredentialsPath
Path to the credentials file for authentication.
public string CredentialsPath { get; set; }
26.40.4.6.1. Property Value
26.40.4.7. DataRetention
Duration for which data should be retained in the database.
public TimeSpan DataRetention { get; set; }
26.40.4.7.1. Property Value
26.40.4.8. DatabaseName
Name of the database to connect to.
public string DatabaseName { get; set; }
26.40.4.8.1. Property Value
26.40.4.9. DirectConnection
Whether to connect directly to the MongoDB server, bypassing the replica set.
public bool DirectConnection { get; set; }
26.40.4.9.1. Property Value
26.40.4.10. Host
Hostname of the MongoDB server.
public string Host { get; set; }
26.40.4.10.1. Property Value
26.40.4.11. LogRequest
Log requests made to the MongoDB server for debugging and monitoring purposes.
public bool LogRequest { get; set; }
26.40.4.11.1. Property Value
26.40.4.12. MaxConnectionPoolSize
Maximum size of the connection pool.
public int MaxConnectionPoolSize { get; set; }
26.40.4.12.1. Property Value
26.40.4.13. MaxRetries
Maximum number of retry attempts for failed operations.
public int MaxRetries { get; set; }
26.40.4.13.1. Property Value
26.40.4.14. Password
Password for connecting to the MongoDB server.
public string Password { get; set; }
26.40.4.14.1. Property Value
26.40.4.15. Port
Port number for the MongoDB server connection.
public int Port { get; set; }
26.40.4.15.1. Property Value
26.40.4.16. ReplicaSet
Name of the replica set to connect to.
public string ReplicaSet { get; set; }
26.40.4.16.1. Property Value
26.40.4.17. ServerSelectionTimeout
Timeout duration for server selection.
public TimeSpan ServerSelectionTimeout { get; set; }
26.40.4.17.1. Property Value
26.40.4.19. TableStorage
Table storage configuration.
public TableStorage TableStorage { get; set; }
26.40.4.19.1. Property Value
26.40.4.20. Tls
Whether to use TLS for the connection.
public bool Tls { get; set; }
26.40.4.20.1. Property Value
26.40.4.21. UseHashed
Whether to use hashed indexes when creating indexes for MongoDB collections. If true, hashed indexes will be created; otherwise, ascending indexes will be used.
public bool UseHashed { get; set; }
26.40.4.21.1. Property Value
26.40.4.22. User
Username for connecting to the MongoDB server.
public string User { get; set; }