C# Class Microsoft.WindowsAzure.StorageClient.ParallelUpload

Class used to upload blocks for a blob in parallel.
The parallelism factor is configurable at the CloudBlobClient.
Exibir arquivo Open project: richorama/azure-sdk-for-mono Class Usage Examples

Private Methods

Method Description
CommitBlob ( ) : System.Collections.Generic.IEnumerable

As a final step upload the block list to commit the blob.

CompleteAsyncresult ( List asyncResults, int index ) : void

Completes the asyncresult.

DispenseBlockStream ( long blockIdSequenceNumber, Action setResult ) : System.Collections.Generic.IEnumerable

Upload a single block. This can happen on parallel threads.

GetParallelismFactor ( ) : int

Gets the parallelism factor.

GetWaitTimeout ( BlobRequestOptions options ) : int

Gets the wait timeout.

ParallelExecute ( Func uploadFunc ) : System.Collections.Generic.IEnumerable

Perform a parallel upload of blocks for a blob from a given stream.

The operation is done as a series of alternate producer and consumer tasks. The producer tasks dispense out chunks of source stream as fixed size blocks. This is done in serial order on a thread using InvokeTaskSequence's serial execution. The consumer tasks upload each block in parallel on multiple thread. The producer thread waits for at least one consumer task to finish before adding more producer tasks. The producer thread quits when no more data can be read from the stream and no other pending consumer tasks.

ParallelUpload ( Stream source, BlobRequestOptions options, long blockSize, CloudBlockBlob blob ) : System

Initializes a new instance of the ParallelUpload class.