public ArchivingEngine(
     string sourceRootFolder,
     string targetRootFolder,
     ArchivingSettings settings,
     TotalStatistics statistics,
     ILog log)
 {
     this.sourceRootFolder = sourceRootFolder;
     this.targetRootFolder = targetRootFolder;
     this.statistics = statistics;
     this.settings = settings;
     this.log = log;
     queue = new RingBuffer<Processing>();
     processingDistributor = new ProcessingDistributor(
         sourceRootFolder,
         targetRootFolder,
         statistics,
         queue,
         log);
     processingPool = new PipelinesPool(processingDistributor);
     retrievingDistributor = new RetrievingDistributor(
         queue,
         log);
     retrievingPool = new PipelinesPool(retrievingDistributor);
 }
Exemple #2
0
 private static void Start(string[] args, ILog log)
 {
     var arguments = new Arguments(args);
     var statistics = new TotalStatistics();
     ArchivingEngine engine = new ArchivingEngine(
         arguments.Source,
         arguments.Target,
         ArchivingSettings.Instance,
         statistics,
         log);
     engine.Start();
     ThreadPool.QueueUserWorkItem(Display, engine);
 }
 public ProcessingDistributor(
     string sourceRootFolder,
     string targetRootFolder,
     TotalStatistics statistics,
     RingBuffer<Processing> queue,
     ILog log)
 {
     syncRoot = new object();
     sourceFoldersIterator =
         GetSourceDirectories(sourceRootFolder);
     this.sourceRootFolder = sourceRootFolder;
     this.targetRootFolder = targetRootFolder;
     this.statistics = statistics;
     this.queue = queue;
     this.log = log;
 }