C# Класс BlobSync.AzureOps

Наследование: ICloudOps
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CalculateDeltaSize ( string containerName, string blobName, string localFilePath ) : long
CalculateDeltaSizeFromLocalSig ( string localSigPath, string localFilePath ) : long
DefragBlob ( SizeBasedCompleteSignature blobSig, long maxUploadLimitMB = 2 ) : void

Merge smaller blocks into something at least fragmentMergeSize bytes long. Only upload at most maxUploadLimit (0 == no limit). Should this be in CommonOps? Lame... really? DEFRAG? Then again I suppose the term IS appropriate.

DefragBlob ( string filePath, long maxUploadLimitMB = 2 ) : void

Merge smaller blocks into something at least fragmentMergeSize bytes long. Only upload at most maxUploadLimit (0 == no limit). Should this be in CommonOps? Lame... really? DEFRAG? Then again I suppose the term IS appropriate.

DefragBlob ( string containerName, string blobName, long maxUploadLimitMB = 2 ) : void

Merge smaller blocks into something at least fragmentMergeSize bytes long. Only upload at most maxUploadLimit (0 == no limit). Should this be in CommonOps? Lame... really? DEFRAG? Then again I suppose the term IS appropriate.

DownloadBlob ( string containerName, string blobName, Stream stream, int parallelFactor = 2 ) : long
DownloadBlob ( string containerName, string blobName, string localFilePath, int parallelFactor = 2 ) : long
DownloadSignatureForBlob ( string container, string blobName ) : SizeBasedCompleteSignature
GenerateDeltaSigFromLocalResources ( string localSigPath, string localFilePath ) : SizeBasedCompleteSignature
GetBlockListInfo ( string containerName, string blobName ) : void
UploadFile ( string containerName, string blobName, string localFilePath, int parallelFactor = 2 ) : long
UploadSignatureForBlob ( string blobName, string containerName, SizeBasedCompleteSignature sig ) : void

Приватные методы

Метод Описание
DefragSigGroup ( SizeBasedCompleteSignature blobSig, DefragNode sig ) : void
DownloadBytes ( string containerName, string blobName, long beginOffset, long endOffset, int parallelFactor = 2 ) : byte[]
FilterUploadedBlocks ( List allUploadedBlocks ) : void

Not currently used but DONT DELETE YET!!

GenerateByteRangesOfBlobToDownload ( List sigsToReuseList, SizeBasedCompleteSignature cloudBlobSig, string containerName, string blobName ) : List
GetBlobMD5 ( string containerName, string blobName ) : string
GetFileMD5 ( string localFilePath ) : string
PutBlockList ( string blockIdArray, string containerName, string blobName ) : void
ReadBlockBlob ( ICloudBlob blobRef, Stream stream, int parallelFactor = 2 ) : void
RegenerateBlob ( string containerName, string blobName, List byteRangesToDownload, string localFilePath, List reusableBlockSignatures, SizeBasedCompleteSignature blobSig, int parallelFactor = 2 ) : void
UploadBytes ( RemainingBytes remainingBytes, string localFilePath, string containerName, string blobName, bool testMode = false ) : List
UploadBytesParallel ( RemainingBytes remainingBytes, string localFilePath, string containerName, string blobName, bool testMode = false, int parallelFactor = 2 ) : List
UploadDelta ( string localFilePath, SignatureSearchResult searchResults, string containerName, string blobName, bool testMode = false, int parallelFactor = 2 ) : List
WriteBytes ( long offset, int bytesRead, byte bytesToRead, Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob blob, ConcurrentBag uploadedBlockList, bool testMode ) : System.Threading.Tasks.Task

Yes, copying the byte array to here. But given we'll not have many of these tasks going to parallel and each byte array is AT MOST 4M, I think I can live with the memory overhead.

Описание методов

CalculateDeltaSize() публичный Метод

public CalculateDeltaSize ( string containerName, string blobName, string localFilePath ) : long
containerName string
blobName string
localFilePath string
Результат long

CalculateDeltaSizeFromLocalSig() публичный Метод

public CalculateDeltaSizeFromLocalSig ( string localSigPath, string localFilePath ) : long
localSigPath string
localFilePath string
Результат long

DefragBlob() публичный Метод

Merge smaller blocks into something at least fragmentMergeSize bytes long. Only upload at most maxUploadLimit (0 == no limit). Should this be in CommonOps? Lame... really? DEFRAG? Then again I suppose the term IS appropriate.
public DefragBlob ( SizeBasedCompleteSignature blobSig, long maxUploadLimitMB = 2 ) : void
blobSig BlobSync.Datatypes.SizeBasedCompleteSignature
maxUploadLimitMB long
Результат void

DefragBlob() публичный Метод

Merge smaller blocks into something at least fragmentMergeSize bytes long. Only upload at most maxUploadLimit (0 == no limit). Should this be in CommonOps? Lame... really? DEFRAG? Then again I suppose the term IS appropriate.
public DefragBlob ( string filePath, long maxUploadLimitMB = 2 ) : void
filePath string
maxUploadLimitMB long
Результат void

DefragBlob() публичный Метод

Merge smaller blocks into something at least fragmentMergeSize bytes long. Only upload at most maxUploadLimit (0 == no limit). Should this be in CommonOps? Lame... really? DEFRAG? Then again I suppose the term IS appropriate.
public DefragBlob ( string containerName, string blobName, long maxUploadLimitMB = 2 ) : void
containerName string
blobName string
maxUploadLimitMB long
Результат void

DownloadBlob() публичный Метод

public DownloadBlob ( string containerName, string blobName, Stream stream, int parallelFactor = 2 ) : long
containerName string
blobName string
stream Stream
parallelFactor int
Результат long

DownloadBlob() публичный Метод

public DownloadBlob ( string containerName, string blobName, string localFilePath, int parallelFactor = 2 ) : long
containerName string
blobName string
localFilePath string
parallelFactor int
Результат long

DownloadSignatureForBlob() публичный Метод

public DownloadSignatureForBlob ( string container, string blobName ) : SizeBasedCompleteSignature
container string
blobName string
Результат BlobSync.Datatypes.SizeBasedCompleteSignature

GenerateDeltaSigFromLocalResources() публичный Метод

public GenerateDeltaSigFromLocalResources ( string localSigPath, string localFilePath ) : SizeBasedCompleteSignature
localSigPath string
localFilePath string
Результат BlobSync.Datatypes.SizeBasedCompleteSignature

GetBlockListInfo() публичный Метод

public GetBlockListInfo ( string containerName, string blobName ) : void
containerName string
blobName string
Результат void

UploadFile() публичный Метод

public UploadFile ( string containerName, string blobName, string localFilePath, int parallelFactor = 2 ) : long
containerName string
blobName string
localFilePath string
parallelFactor int
Результат long

UploadSignatureForBlob() публичный Метод

public UploadSignatureForBlob ( string blobName, string containerName, SizeBasedCompleteSignature sig ) : void
blobName string
containerName string
sig BlobSync.Datatypes.SizeBasedCompleteSignature
Результат void