コード例 #1
0
 public ParallelProcessor(
     IAsyncProcessor asyncProcessor,
     SegmentalCompressionConfiguration configuration)
 {
     this.asyncProcessor = asyncProcessor;
     this.configuration  = configuration;
     this.asyncProcessor.ProcessingEnded += AsyncProcessor_ProcessingEnded;
 }
コード例 #2
0
 public BlockByBlockStreamWriter(
     ISegmentStreamWriter segmentStreamWriter,
     IDataSegmenter dataSegmenter,
     IParallelProcessor parallelProcessor,
     SegmentalCompressionConfiguration configuration)
 {
     this.segmentStreamWriter = segmentStreamWriter;
     this.dataSegmenter       = dataSegmenter;
     this.configuration       = configuration;
     this.parallelProcessor   = parallelProcessor;
 }
コード例 #3
0
        public void Setup()
        {
            SegmentalCompressionConfiguration configuration = new SegmentalCompressionConfiguration {
                ThreadsCount = 4, SegmentSize = 1024
            };

            ExceptionConsumingProcessor exceptionConsumingProcessor = new ExceptionConsumingProcessor();

            fileResizer = new FileResizer(new BlockByBlockStreamWriter(
                                              new ParallelProcessor(new AsyncProcessor(), configuration),
                                              new ExceptionConsumingSegmentStreamReader(
                                                  new SyncSegmentStreamReader(configuration, new DataSegmenter()), exceptionConsumingProcessor),
                                              new ExceptionConsumingSegmentStreamWriter(
                                                  new SyncSegmentStreamWriter(), exceptionConsumingProcessor)
                                              ));
        }
コード例 #4
0
 public SyncSegmentStreamReader(SegmentalCompressionConfiguration configuration, IDataSegmenter dataSegmenter)
 {
     this.configuration = configuration;
     this.dataSegmenter = dataSegmenter;
 }