internal RioCompletionWorker(int workerId, IWorkerConfiguration configuration, ICompletionHandler completionHandler) { _workerId = workerId; _configuration = configuration; _completionHandler = completionHandler; SendingCompletionQueue = new RioCompletionQueue(configuration.CompletionQueueSize); }
public DiffProcessor(IWorkerConfiguration workerConfig, ISynchronization sync, ISvc source, ISvc target, IBlackMirrorHttpClient httpClient, ISyncLogger syncLogger, IUser defaultPushUser) { //this.mirror = mirror; this.sync = sync; this.source = source; this.target = target; this.httpClient = httpClient; this.syncLogger = syncLogger; this.defaultPushUser = defaultPushUser; this.ignoredFiles = sync.Mirror.IgnoredFiles?.ToList() ?? new List <string>(); this.ignoredFiles.AddRange(new[] { @"^\.svn\\?.*$", @"(^\.git\\.*$)|(^\.git$)", @"^.*\\node_modules\\.*$", @"^.*\\bower_components\\.*$", @"^packages\\?.*$", @"^.*\.dll$", @"^.*\.pdb", @"^.*\.nupkg", @"^.*\.tar", @"^.*\.tgz", @"^.*\.jar", @"^.*\.exe", }); this.retriever = new UserRetriever(workerConfig); this.timeoutMaxRetryCount = workerConfig.TimeoutMaxRetryCount; }
public WorkerScheduler(IWorkerConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } _configuration = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="AbortWorkerThread" /> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="messageMode">The message mode.</param> public AbortWorkerThread(IWorkerConfiguration configuration, MessageProcessingMode messageMode) { Guard.NotNull(() => configuration, configuration); Guard.NotNull(() => messageMode, messageMode); _configuration = configuration; _messageMode = messageMode; }
public SyncClient(IWorkerConfiguration workerConfig) : base(workerConfig) { this.syncUri = new Uri(new Uri(workerConfig.ApiUrl), "/sync/"); WebRequestHandler handler = new WebRequestHandler(); X509Certificate certificate = base.ClientCertificateProvider.ClientCertificate; handler.ClientCertificates.Add(certificate); this.httpClient = new HttpClient(handler); }
public ApiHttpClientSyncQueue(IWorkerConfiguration workerConfig) { this.syncUri = new Uri(new Uri(workerConfig.ApiUrl), "/sync/"); var clientCertificateProvider = new X509StoreCertificateProvider(X509FindType.FindBySubjectName, workerConfig.ClientCertificate, false, StoreName.My, StoreLocation.LocalMachine); WebRequestHandler handler = new WebRequestHandler(); X509Certificate certificate = clientCertificateProvider.ClientCertificate; handler.ClientCertificates.Add(certificate); this.httpClient = new HttpClient(handler); }
public UserRetriever(IWorkerConfiguration workerConfig) { this.workerConfig = workerConfig; WebRequestHandler handler = new WebRequestHandler(); var certProvider = new X509StoreCertificateProvider( X509FindType.FindBySubjectName, workerConfig.ClientCertificate, false); var cert = certProvider.ClientCertificate; handler.ClientCertificates.Add(cert); this.httpClient = new HttpClient(handler); }
/// <summary> /// Initializes a new instance of the <see cref="AbortWorkerThreadDecorator" /> class. /// </summary> /// <param name="log">The log.</param> /// <param name="configuration">The configuration.</param> /// <param name="messageMode">The message mode.</param> /// <param name="handler">The handler.</param> public AbortWorkerThreadDecorator(ILogFactory log, IWorkerConfiguration configuration, MessageProcessingMode messageMode, IAbortWorkerThread handler) { Guard.NotNull(() => log, log); Guard.NotNull(() => handler, handler); Guard.NotNull(() => configuration, configuration); Guard.NotNull(() => messageMode, messageMode); _log = log.Create(); _handler = handler; _configuration = configuration; _messageMode = messageMode; }
/// <summary> /// Initializes a new instance of the <see cref="StopWorker"/> class. /// </summary> /// <param name="cancelWorkSource">The cancel work source.</param> /// <param name="configuration">The configuration.</param> /// <param name="log">The log.</param> /// <param name="waitForEventOrCancel">The wait for event or cancel.</param> public StopWorker(IQueueCancelWork cancelWorkSource, IWorkerConfiguration configuration, ILogFactory log, IWorkerWaitForEventOrCancel waitForEventOrCancel) { Guard.NotNull(() => cancelWorkSource, cancelWorkSource); Guard.NotNull(() => configuration, configuration); Guard.NotNull(() => log, log); Guard.NotNull(() => waitForEventOrCancel, waitForEventOrCancel); _cancelWorkSource = cancelWorkSource; _configuration = configuration; _log = log.Create(); _waitForEventOrCancel = waitForEventOrCancel; }
/// <summary> /// Initializes a new instance of the <see cref="QueueConsumerConfiguration" /> class. /// </summary> /// <param name="transportConfiguration">The transport configuration.</param> /// <param name="workerConfiguration">The worker configuration.</param> /// <param name="heartBeatConfiguration">The heart beat configuration.</param> /// <param name="messageExpirationConfiguration">The message expiration configuration.</param> /// <param name="headers">The headers.</param> /// <param name="additionalConfiguration">The additional configuration.</param> /// <param name="timeConfiguration">The time configuration.</param> public QueueConsumerConfiguration(TransportConfigurationReceive transportConfiguration, IWorkerConfiguration workerConfiguration, IHeartBeatConfiguration heartBeatConfiguration, IMessageExpirationConfiguration messageExpirationConfiguration, IHeaders headers, IConfiguration additionalConfiguration, BaseTimeConfiguration timeConfiguration) : base(transportConfiguration, headers, additionalConfiguration, timeConfiguration) { Guard.NotNull(() => workerConfiguration, workerConfiguration); Guard.NotNull(() => heartBeatConfiguration, heartBeatConfiguration); Guard.NotNull(() => messageExpirationConfiguration, messageExpirationConfiguration); Worker = workerConfiguration; HeartBeat = heartBeatConfiguration; MessageExpiration = messageExpirationConfiguration; Routes = new List <string>(); }
/// <summary> /// Initializes a new instance of the <see cref="WorkerCollection"/> class. /// </summary> /// <param name="workerConfiguration">The worker configuration.</param> /// <param name="workerFactory">The worker factory.</param> /// <param name="stopWorker">The stop worker.</param> /// <param name="log">The log.</param> /// <param name="workerPause">The worker pause.</param> public WorkerCollection(IWorkerConfiguration workerConfiguration, IWorkerFactory workerFactory, StopWorker stopWorker, ILogFactory log, IWorkerWaitForEventOrCancel workerPause) { Guard.NotNull(() => workerConfiguration, workerConfiguration); Guard.NotNull(() => workerFactory, workerFactory); Guard.NotNull(() => stopWorker, stopWorker); Guard.NotNull(() => log, log); Guard.NotNull(() => workerPause, workerPause); _workerConfiguration = workerConfiguration; _workerFactory = workerFactory; _stopWorker = stopWorker; _log = log.Create(); _workerPause = workerPause; }
/// <summary> /// Initializes a new instance of the <see cref="QueueConsumerConfiguration" /> class. /// </summary> /// <param name="transportConfiguration">The transport configuration.</param> /// <param name="workerConfiguration">The worker configuration.</param> /// <param name="heartBeatConfiguration">The heart beat configuration.</param> /// <param name="messageExpirationConfiguration">The message expiration configuration.</param> /// <param name="headers">The headers.</param> /// <param name="additionalConfiguration">The additional configuration.</param> /// <param name="timeConfiguration">The time configuration.</param> public QueueConsumerConfiguration(TransportConfigurationReceive transportConfiguration, IWorkerConfiguration workerConfiguration, IHeartBeatConfiguration heartBeatConfiguration, IMessageExpirationConfiguration messageExpirationConfiguration, IHeaders headers, IConfiguration additionalConfiguration, BaseTimeConfiguration timeConfiguration) : base(transportConfiguration, headers, additionalConfiguration, timeConfiguration) { Guard.NotNull(() => workerConfiguration, workerConfiguration); Guard.NotNull(() => heartBeatConfiguration, heartBeatConfiguration); Guard.NotNull(() => messageExpirationConfiguration, messageExpirationConfiguration); Worker = workerConfiguration; HeartBeat = heartBeatConfiguration; MessageExpiration = messageExpirationConfiguration; _routes = new List<string>(); }
protected WorkerController(IWorkerConfiguration workerConfiguration, IWorkerScheduler workerScheduler) { WorkerConfiguration = workerConfiguration; WorkerScheduler = workerScheduler; }
public WorkerStartController(IWorkerConfiguration workerConfiguration, IWorkerScheduler workerScheduler) : base(workerConfiguration, workerScheduler) { }
/// <summary> /// Initializes a new instance of the <see cref="WorkerWaitForEventOrCancel"/> class. /// </summary> /// <param name="waitForEventOrCancel">The wait for event or cancel.</param> /// <param name="workerConfiguration">The worker configuration.</param> public WorkerWaitForEventOrCancel(IWaitForEventOrCancelWorker waitForEventOrCancel, IWorkerConfiguration workerConfiguration) { _waitForEventOrCancel = waitForEventOrCancel; _workerConfiguration = workerConfiguration; }
public BlackMirrorHttpClient(IWorkerConfiguration workerConfig) { this.Reflection = new ReflectionClient(workerConfig); this.Mirror = new MirrorClient(workerConfig); }
protected HttpClientBase(IWorkerConfiguration workerConfig) { this.WorkerConfig = workerConfig; this.ClientCertificateProvider = new X509StoreCertificateProvider(X509FindType.FindBySubjectName, workerConfig.ClientCertificate, false, StoreName.My, StoreLocation.LocalMachine); }
public WorkerScheduler(IWorkerConfiguration configuration) { if (configuration == null) throw new ArgumentNullException(nameof(configuration)); _configuration = configuration; }
public WorkerRegistrationController(IWorkerConfiguration workerConfiguration, IWorkerScheduler workerScheduler) : base(workerConfiguration, workerScheduler) { }
public ServiceApp(IWorkerConfiguration workerConfig) { this.workerConfig = workerConfig; }
public ApiHttpSyncLogger(IWorkerConfiguration workerConfig) { this.httpClient = new SyncClient(workerConfig); }
public SyncHandler(IWorkerConfiguration workerConfig, IBlackMirrorHttpClient httpClient, ISyncLogger syncLogger) { this.workerConfig = workerConfig; this.httpClient = httpClient; this.syncLogger = syncLogger; }