2015-03-04 12:16:28 +01:00
|
|
|
|
using System;
|
2016-01-21 18:36:04 +01:00
|
|
|
|
using System.ComponentModel;
|
2015-03-04 12:16:28 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Sync
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Provides options to the <see cref="DatabaseServerRegistrar"/>.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public sealed class DatabaseServerRegistrarOptions
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Initializes a new instance of the <see cref="DatabaseServerRegistrarOptions"/> class with default values.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public DatabaseServerRegistrarOptions()
|
|
|
|
|
|
{
|
2015-08-25 15:48:12 +02:00
|
|
|
|
StaleServerTimeout = TimeSpan.FromMinutes(2); // 2 minutes
|
2016-01-21 18:36:04 +01:00
|
|
|
|
RecurringSeconds = 60; // do it every minute
|
2015-03-04 12:16:28 +01:00
|
|
|
|
}
|
2018-05-01 10:39:04 +10:00
|
|
|
|
|
2015-03-04 12:16:28 +01:00
|
|
|
|
/// <summary>
|
2016-01-21 18:36:04 +01:00
|
|
|
|
/// The amount of seconds to wait between calls to the database on the background thread
|
2015-03-04 12:16:28 +01:00
|
|
|
|
/// </summary>
|
2016-01-21 18:36:04 +01:00
|
|
|
|
public int RecurringSeconds { get; set; }
|
2015-03-04 12:16:28 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The time span to wait before considering a server stale, after it has last been accessed.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public TimeSpan StaleServerTimeout { get; set; }
|
|
|
|
|
|
}
|
2017-07-20 11:21:28 +02:00
|
|
|
|
}
|