DS3 .NET Software Development Kit  3.0.0
Provides access to the Spectra Logic DS3 API through .NET.
Ds3.Helpers.Ds3ClientHelpers Class Reference
Inheritance diagram for Ds3.Helpers.Ds3ClientHelpers:
Ds3.Helpers.IDs3ClientHelpers

Public Member Functions

 Ds3ClientHelpers (IDs3Client client, int retryAfter=-1, int getObjectRetries=5, int jobRetries=-1, int jobWaitTime=5)
 
IJob StartWriteJob (string bucket, IEnumerable< Ds3Object > objectsToWrite, long?maxBlobSize=null, IHelperStrategy< string > helperStrategy=null)
 Runs a DS3 bulk PUT request with a set of objects and returns an interface that can PUT individual objects efficiently to the server. More...
 
IJob StartReadJob (string bucket, IEnumerable< Ds3Object > objectsToRead, IHelperStrategy< string > helperStrategy=null)
 Runs a DS3 bulk GET request with a set of objects and returns an interface that can GET individual objects efficiently from the server. More...
 
IPartialReadJob StartPartialReadJob (string bucket, IEnumerable< string > fullObjects, IEnumerable< Ds3PartialObject > partialObjects, IHelperStrategy< Ds3PartialObject > helperStrategy=null)
 Runs a DS3 bulk GET request with a set of partial object transfers and returns an interface that can GET individual object parts efficiently from the server. More...
 
IJob StartReadAllJob (string bucket, IHelperStrategy< string > helperStrategy=null)
 Runs a DS3 bulk GET request for all of the objects in a bucket. More...
 
IEnumerable< Ds3ObjectListObjects (string bucketName)
 Returns information about all of the objects in a bucket. More...
 
IEnumerable< Ds3ObjectListObjects (string bucketName, string keyPrefix)
 Returns information about all of the objects in a bucket whose names start with a given prefix. More...
 
void EnsureBucketExists (string bucketName)
 Creates a bucket if it does not exist. More...
 
IJob RecoverWriteJob (Guid jobId, IHelperStrategy< string > helperStrategy=null)
 Determines the state of an existing bulk PUT job and returns an interface that can PUT the remaining objects efficiently. More...
 

Member Function Documentation

void Ds3.Helpers.Ds3ClientHelpers.EnsureBucketExists ( string  bucketName)
inline

Creates a bucket if it does not exist.

Parameters
bucketName

Implements Ds3.Helpers.IDs3ClientHelpers.

IEnumerable<Ds3Object> Ds3.Helpers.Ds3ClientHelpers.ListObjects ( string  bucketName)
inline

Returns information about all of the objects in a bucket.

Note that this method requests 1,000 objects at a time as they are consumed. Thus, if a bucket contains 2,500 objects and you call helpers.ListObjects("bucket").Take(1500).ToList() then the client will issue exactly two requests.

Parameters
bucketName
Returns

Implements Ds3.Helpers.IDs3ClientHelpers.

IEnumerable<Ds3Object> Ds3.Helpers.Ds3ClientHelpers.ListObjects ( string  bucketName,
string  keyPrefix 
)
inline

Returns information about all of the objects in a bucket whose names start with a given prefix.

Parameters
bucketName
keyPrefix
Returns

Implements Ds3.Helpers.IDs3ClientHelpers.

IJob Ds3.Helpers.Ds3ClientHelpers.RecoverWriteJob ( Guid  jobId,
IHelperStrategy< string >  helperStrategy = null 
)
inline

Determines the state of an existing bulk PUT job and returns an interface that can PUT the remaining objects efficiently.

Parameters
jobId
helperStrategy
Returns
An IJob implementation that can put each object per the DS3 protocol.

Implements Ds3.Helpers.IDs3ClientHelpers.

IPartialReadJob Ds3.Helpers.Ds3ClientHelpers.StartPartialReadJob ( string  bucket,
IEnumerable< string >  fullObjects,
IEnumerable< Ds3PartialObject partialObjects,
IHelperStrategy< Ds3PartialObject helperStrategy = null 
)
inline

Runs a DS3 bulk GET request with a set of partial object transfers and returns an interface that can GET individual object parts efficiently from the server.

Note that you can get multiple ranges within the same object at the same time, but those ranges must be non-overlapping.

Parameters
bucketThe name of the bucket to get the objects from.
fullObjectsThe list of full objects to get.
partialObjectsThe object parts to get.
helperStrategy
Returns
The IPartialReadJob implementation that can get each partial object per the DS3 protocol.

Implements Ds3.Helpers.IDs3ClientHelpers.

IJob Ds3.Helpers.Ds3ClientHelpers.StartReadAllJob ( string  bucket,
IHelperStrategy< string >  helperStrategy = null 
)
inline

Runs a DS3 bulk GET request for all of the objects in a bucket.

Parameters
bucketThe name of the bucket to get the objects from.
helperStrategy
Returns
An IJob implementation that can get each object per the DS3 protocol.

Implements Ds3.Helpers.IDs3ClientHelpers.

IJob Ds3.Helpers.Ds3ClientHelpers.StartReadJob ( string  bucket,
IEnumerable< Ds3Object objectsToRead,
IHelperStrategy< string >  helperStrategy = null 
)
inline

Runs a DS3 bulk GET request with a set of objects and returns an interface that can GET individual objects efficiently from the server.

Parameters
bucketThe name of the bucket to get the objects from.
objectsToReadThe object names to get.
helperStrategy
Returns
An IJob implementation that can get each object per the DS3 protocol.

Implements Ds3.Helpers.IDs3ClientHelpers.

IJob Ds3.Helpers.Ds3ClientHelpers.StartWriteJob ( string  bucket,
IEnumerable< Ds3Object objectsToWrite,
long?  maxBlobSize = null,
IHelperStrategy< string >  helperStrategy = null 
)
inline

Runs a DS3 bulk PUT request with a set of objects and returns an interface that can PUT individual objects efficiently to the server.

See also
FileHelpers.ListObjectsForDirectory
Parameters
bucketThe name of the bucket to put the objects to.
objectsToWriteThe object names and sizes to put.
maxBlobSizeThe (optional) maximum size for the parts of the objects to transmit.
helperStrategy
Returns
An IJob implementation that can put each object per the DS3 protocol.

Implements Ds3.Helpers.IDs3ClientHelpers.