public IJob StartReadJob(string bucket, IEnumerable <Ds3Object> objectsToRead) { var jobResponse = this._client.BulkGet( new BulkGetRequest(bucket, VerifyObjectCount(objectsToRead)) .WithChunkOrdering(ChunkOrdering.None) ); return(FullObjectJob.Create( jobResponse, new ReadTransferItemSource(this._client, jobResponse), new ReadTransferrer() )); }
public IJob RecoverWriteJob(Guid jobId) { var jobResponse = this._client.ModifyJob(new ModifyJobRequest(jobId)); if (jobResponse.RequestType != JobTypePut) { throw new InvalidOperationException(Resources.ExpectedPutJobButWasGetJobException); } return(FullObjectJob.Create( jobResponse, new WriteTransferItemSource(this._client, jobResponse), new WriteTransferrer() )); }
public IJob StartWriteJob(string bucket, IEnumerable <Ds3Object> objectsToWrite, long?maxBlobSize = null) { var request = new BulkPutRequest( bucket, VerifyObjectCount(objectsToWrite) ); if (maxBlobSize.HasValue) { request.WithMaxBlobSize(maxBlobSize.Value); } var jobResponse = this._client.BulkPut(request); return(FullObjectJob.Create( jobResponse, new WriteTransferItemSource(this._client, jobResponse), new WriteTransferrer() )); }