コード例 #1
0
        public NotificationTracker(ILogConsistencyProtocolServices services, IEnumerable <string> remoteInstances, int maxNotificationBatchSize, IConnectionIssueListener listener)
        {
            this.services = services;
            this.listener = listener;
            sendWorkers   = new Dictionary <string, NotificationWorker>();
            this.maxNotificationBatchSize = maxNotificationBatchSize;

            foreach (var x in remoteInstances)
            {
                services.Log(Severity.Verbose, "Now sending notifications to {0}", x);
                sendWorkers.Add(x, new NotificationWorker(this, x));
            }
        }
コード例 #2
0
        /// <inheritdoc/>
        public virtual Task PreOnActivate()
        {
            Services.Log(LogLevel.Trace, "PreActivation Started");

            // this flag indicates we have not done an initial load from storage yet
            // we do not act on this yet, but wait until after user OnActivate has run.
            needInitialRead = true;

            Services.Log(LogLevel.Trace, "PreActivation Complete");

            return(Task.CompletedTask);
        }