using Microsoft.Azure.Documents.Client; using System; using System.Collections.Generic; namespace Elsa.Persistence.DocumentDb { public class DocumentDbStorageOptions { /// /// Gets or sets the name of the database. /// /// /// The name of the database. /// public string DatabaseName { get; set; } /// /// Gets or sets the url of the DocumentDB. /// /// /// The url of the DocumentDB. /// public string Url { get; set; } /// /// Gets or sets the secret to access DocumentDB. /// /// /// The secret to access DocumentDB. /// public string AuthSecret { get; set; } /// /// Gets or sets the collection details under the DocumentDB. /// /// /// The collection details. /// public IDictionary CollectionInfos { get; set; } /// /// Get or sets the request timeout for DocumentDB client. Default value set to 30 seconds /// public TimeSpan RequestTimeout { get; set; } /// /// Get or set the interval timespan to process expired entries. Default value 15 minutes /// Expired items under "locks", "jobs", "lists", "sets", "hashs", "counters/aggregated" will be checked /// public TimeSpan ExpirationCheckInterval { get; set; } /// /// Get or sets the interval timespan to aggregated the counters. Default value 1 minute /// public TimeSpan CountersAggregateInterval { get; set; } /// /// Gets or sets the interval timespan to poll the queue for processing any new jobs. Default value 2 minutes /// public TimeSpan QueuePollInterval { get; set; } /// /// Gets or sets the connection mode for the DocumentDB client. Default value is Direct. /// public ConnectionMode ConnectionMode { get; set; } /// /// Gets or sets the connection protocol for the DocumentDB client. Default value is TCP. /// public Protocol ConnectionProtocol { get; set; } /// /// Create an instance of AzureDocumentDB Storage option with default values /// public DocumentDbStorageOptions() { RequestTimeout = TimeSpan.FromSeconds(30); ExpirationCheckInterval = TimeSpan.FromMinutes(2); CountersAggregateInterval = TimeSpan.FromMinutes(2); QueuePollInterval = TimeSpan.FromSeconds(15); ConnectionMode = ConnectionMode.Direct; ConnectionProtocol = Protocol.Tcp; } } }