Пример #1
0
        public static void ModifyForRetry(Stream stream, int retries, ref int currentTry, string objectName, long offset, ref IEnumerable<Range> ranges, ref ITransferStrategy transferStrategy, Ds3ContentLengthNotMatch ex)
        {
            CanRetry(stream, retries, currentTry, objectName, offset, ex);

            // Issue a partial get for the remainder of the request
            // Seek back one byte to make sure that the connection did not fail part way through a byte
            stream.Seek(-1, SeekOrigin.Current);

            ranges = JobsUtil.RetryRanges(ranges, ex.BytesRead, ex.ContentLength);
            transferStrategy = new PartialReadTransferStrategy();

            currentTry++;
        }
Пример #2
0
 public TransferFile(ITransferStrategy t)
 {
     this._transferStrategy = t;
 }