Example #1
0
        internal static void Startup(CompletionState uncompleted, int lastActivityIdFromDb)
        {
            CommunicationMonitor.Stop();

            Serializer.Reset();
            DependencyManager.Reset();
            TerminationHistory.Reset(uncompleted.LastActivityId, uncompleted.Gaps);
            Serializer.Start(lastActivityIdFromDb, uncompleted.LastActivityId, uncompleted.Gaps);

            CommunicationMonitor.Start();
        }
Example #2
0
        public SecurityActivityQueue(SecuritySystem securitySystem, CommunicationMonitor communicationMonitor,
                                     DataHandler dataHandler, SecurityActivityHistoryController activityHistory)
        {
            _securitySystem               = securitySystem;
            _communicationMonitor         = communicationMonitor;
            _dataHandler                  = dataHandler;
            _serializer                   = new Serializer(this, activityHistory, dataHandler);
            _executor                     = new Executor(activityHistory);
            _terminationHistory           = new TerminationHistory();
            _dependencyManager            = new DependencyManager(_serializer, _executor, _terminationHistory, activityHistory);
            _serializer.DependencyManager = _dependencyManager;
            _executor.DependencyManager   = _dependencyManager;

            communicationMonitor.HearthBeat += (sender, args) => HealthCheck();
        }