/// <summary> /// Initializes a new instance of the <see cref="InstructionProcessTask"/> class. /// </summary> /// <param name="runtimeState">Representation of the state of the Umbraco runtime.</param> /// <param name="messenger">Service broadcasting cache notifications to registered servers.</param> /// <param name="logger">The typed logger.</param> /// <param name="globalSettings">The configuration for global settings.</param> public InstructionProcessTask(IRuntimeState runtimeState, IServerMessenger messenger, ILogger <InstructionProcessTask> logger, IOptions <GlobalSettings> globalSettings) : base(globalSettings.Value.DatabaseServerMessenger.TimeBetweenSyncOperations, TimeSpan.FromMinutes(1)) { _runtimeState = runtimeState; _messenger = messenger; _logger = logger; }
public DatabaseServerRegistrarAndMessengerComponent( IRuntimeState runtime, IServerRegistrar serverRegistrar, IServerMessenger serverMessenger, IServerRegistrationService registrationService, ILogger logger) { _runtime = runtime; _logger = logger; _registrationService = registrationService; // create task runner for DatabaseServerRegistrar _registrar = serverRegistrar as DatabaseServerRegistrar; if (_registrar != null) { _touchTaskRunner = new BackgroundTaskRunner <IBackgroundTask>("ServerRegistration", new BackgroundTaskRunnerOptions { AutoStart = true }, logger); } // create task runner for BatchedDatabaseServerMessenger _messenger = serverMessenger as BatchedDatabaseServerMessenger; if (_messenger != null) { _processTaskRunner = new BackgroundTaskRunner <IBackgroundTask>("ServerInstProcess", new BackgroundTaskRunnerOptions { AutoStart = true }, logger); } }
/// <summary> /// Initializes a new instance of the <see cref="DatabaseServerMessengerNotificationHandler"/> class. /// </summary> public DatabaseServerMessengerNotificationHandler( IServerMessenger serverMessenger, IUmbracoDatabaseFactory databaseFactory, ILogger <DatabaseServerMessengerNotificationHandler> logger, IRuntimeState runtimeState) { _databaseFactory = databaseFactory; _logger = logger; _messenger = serverMessenger; _runtimeState = runtimeState; }
/// <summary> /// Initializes a new instance of the <see cref="ScheduledPublishing"/> class. /// </summary> /// <param name="runtimeState">Representation of the state of the Umbraco runtime.</param> /// <param name="mainDom">Representation of the main application domain.</param> /// <param name="serverRegistrar">Provider of server registrations to the distributed cache.</param> /// <param name="contentService">Service for handling content operations.</param> /// <param name="umbracoContextFactory">Service for creating and managing Umbraco context.</param> /// <param name="logger">The typed logger.</param> /// <param name="serverMessenger">Service broadcasting cache notifications to registered servers.</param> /// <param name="backofficeSecurityFactory">Creates and manages <see cref="IBackOfficeSecurity"/> instances.</param> public ScheduledPublishing( IRuntimeState runtimeState, IMainDom mainDom, IServerRoleAccessor serverRegistrar, IContentService contentService, IUmbracoContextFactory umbracoContextFactory, ILogger <ScheduledPublishing> logger, IServerMessenger serverMessenger) : base(TimeSpan.FromMinutes(1), DefaultDelay) { _runtimeState = runtimeState; _mainDom = mainDom; _serverRegistrar = serverRegistrar; _contentService = contentService; _umbracoContextFactory = umbracoContextFactory; _logger = logger; _serverMessenger = serverMessenger; }
public ScheduledPublishing( IRuntimeState runtimeState, IMainDom mainDom, IServerRoleAccessor serverRegistrar, IContentService contentService, IUmbracoContextFactory umbracoContextFactory, ILogger <ScheduledPublishing> logger, IServerMessenger serverMessenger) : this( runtimeState, mainDom, serverRegistrar, contentService, umbracoContextFactory, logger, serverMessenger, StaticServiceProvider.Instance.GetRequiredService <IScopeProvider>()) { }
/// <summary> /// Sets the server messenger. /// </summary> /// <param name="composition">The composition.</param> /// <param name="registrar">A server messenger.</param> public static void SetServerMessenger(this Composition composition, IServerMessenger registrar) { composition.RegisterUnique(_ => registrar); }
public DropDownPropertyEditorsMigration(IMigrationContext context, CacheRefresherCollection cacheRefreshers, IServerMessenger serverMessenger) : base(context) { _cacheRefreshers = cacheRefreshers; _serverMessenger = serverMessenger; }
public DistributedCache(IServerMessenger serverMessenger, CacheRefresherCollection cacheRefreshers) { _serverMessenger = serverMessenger; _cacheRefreshers = cacheRefreshers; }
/// <summary> /// Sets the server messenger. /// </summary> /// <param name="builder">The builder.</param> /// <param name="registrar">A server messenger.</param> public static IUmbracoBuilder SetServerMessenger(this IUmbracoBuilder builder, IServerMessenger registrar) { builder.Services.AddUnique(registrar); return(builder); }
public TimingCreatedHandler(IAlertCommandRepository alertCommandRepository, IServerMessenger messenger) { _alertCommandRepository = alertCommandRepository; _messenger = messenger; }
public SearchCommandHandler(IAlertCommandRepository repository, IServerMessenger messenger) { _repository = repository; _messenger = messenger; }
public DatabaseServerRegistrarAndMessengerComponent(IRuntimeState runtime, IServerRegistrar serverRegistrar, IServerMessenger serverMessenger, IServerRegistrationService registrationService, ILogger logger, IndexRebuilder indexRebuilder) { _registrar = serverRegistrar as DatabaseServerRegistrar; if (_registrar == null) { throw new Exception("panic: registar."); } _messenger = serverMessenger as BatchedDatabaseServerMessenger; if (_messenger == null) { throw new Exception("panic: messenger"); } _runtime = runtime; _logger = logger; _registrationService = registrationService; _indexRebuilder = indexRebuilder; _touchTaskRunner = new BackgroundTaskRunner <IBackgroundTask>("ServerRegistration", new BackgroundTaskRunnerOptions { AutoStart = true }, logger); _processTaskRunner = new BackgroundTaskRunner <IBackgroundTask>("ServerInstProcess", new BackgroundTaskRunnerOptions { AutoStart = true }, logger); }
public CommandDeleteHandler(IAlertCommandRepository repository, IServerMessenger messenger) { _repository = repository; _messenger = messenger; }