Exemple #1
0
 public void CustomExpiration(RavenGatewayDeduplicationConfiguration gatewayConfiguration)
 {
     #region CustomExpiration
     gatewayConfiguration.DeduplicationDataTimeToLive            = TimeSpan.FromDays(15);
     gatewayConfiguration.FrequencyToRunDeduplicationDataCleanup = 86400;
     #endregion
 }
        public Task ConfigureDeduplicationStorage(string endpointName, EndpointConfiguration configuration, RunSettings settings)
        {
            var ravenGatewayDeduplicationConfiguration = new RavenGatewayDeduplicationConfiguration((builder, _) =>
            {
                databaseName      = Guid.NewGuid().ToString();
                var documentStore = GetInitializedDocumentStore(databaseName);

                documentStore.Maintenance.Server.Send(new CreateDatabaseOperation(new DatabaseRecord(databaseName)));

                return(documentStore);
            });

            var gatewaySettings = configuration.Gateway(ravenGatewayDeduplicationConfiguration);

            configuration.GetSettings().Set(gatewaySettings);

            return(Task.CompletedTask);
        }
Exemple #3
0
    public void DefaultUsage(EndpointConfiguration endpointConfiguration)
    {
        #region DefaultUsage
        var gatewayConfiguration = new RavenGatewayDeduplicationConfiguration((builder, _) =>
        {
            var documentStore = new DocumentStore
            {
                Urls     = new[] { "database-server-url" },
                Database = "default-database-name"
            };

            documentStore.Initialize();

            return(documentStore);
        });

        var gatewaySettings = endpointConfiguration.Gateway(gatewayConfiguration);
        #endregion
    }