|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.soyatec.windows.azure.blob.BlobContainer
public abstract class BlobContainer
The BlobContainer class is used to access and enumerate blobs in the
container. Storage key credentials are needed to access private blobs but not
for public blobs.
| Method Summary | |
|---|---|
abstract boolean |
copyBlob(java.lang.String destContainer,
java.lang.String destBlobName,
java.lang.String sourceBlobName)
Copies a blob to a destination within the storage account. |
abstract boolean |
copyBlob(java.lang.String destContainer,
java.lang.String destBlobName,
java.lang.String sourceBlobName,
NameValueCollection metadata,
BlobConstraints constraints)
Copies a blob to a destination within the storage account. |
abstract boolean |
createBlob(BlobProperties blobProperties,
BlobContents blobContents,
boolean overwrite)
Create a new blob or overwrite an existing blob. |
abstract boolean |
createContainer()
Create the container if it does not exist. |
abstract boolean |
createContainer(NameValueCollection metadata,
ContainerAccessControl accessControl)
Create the container with the specified metadata and access control if it does not exist |
abstract boolean |
deleteBlob(java.lang.String name)
Delete a blob with the given name. |
abstract boolean |
deleteBlobIfNotModified(BlobProperties blob)
Delete a blob with the given name if the blob has not been modified since it was last obtained. |
abstract boolean |
deleteContainer()
Deletes the current container. |
abstract boolean |
doesBlobExist(java.lang.String blobName)
Check if the blob container exists |
abstract boolean |
doesContainerExist()
Check if the blob container exists |
java.lang.String |
getAccountName()
|
java.net.URI |
getBaseUri()
|
abstract BlobProperties |
getBlob(java.lang.String name,
BlobContents blobContents,
boolean transferAsChunks)
Get the blob contents and properties if the blob exists. |
abstract boolean |
getBlobIfModified(BlobProperties blobProperties,
BlobContents blobContents,
boolean transferAsChunks)
Gets the blob contents and properties if the blob has not been modified since the time specified. |
abstract BlobProperties |
getBlobProperties(java.lang.String name)
Get the properties of the blob if it exists. |
long |
getBlockSize()
|
abstract ContainerAccessControl |
getContainerAccessControl()
Get the access control permissions associated with the container. |
java.lang.String |
getContainerName()
|
abstract ContainerProperties |
getContainerProperties()
Get the properties for the container if it exists. |
java.net.URI |
getContainerUri()
|
java.sql.Timestamp |
getLastModifiedTime()
|
RetryPolicy |
getRetryPolicy()
|
TimeSpan |
getTimeout()
|
boolean |
isStopped()
|
boolean |
isUsePathStyleUris()
Indicates whether to use/generate path-style or host-style URIs. |
abstract java.util.Collection<BlobProperties> |
listBlobs(java.lang.String prefix,
boolean combineCommonPrefixes)
Enumerates all blobs with a given prefix. |
abstract java.util.Collection<BlobProperties> |
listBlobs(java.lang.String prefix,
boolean combineCommonPrefixes,
int maxResults)
Enumerates all blobs with a given prefix. |
void |
setBlockSize(long blockSize)
|
abstract void |
setContainerAccessControl(ContainerAccessControl acl)
Set the access control permissions associated with the container. |
void |
setContainerUri(java.net.URI containerUri)
|
void |
setRetryPolicy(RetryPolicy retryPolicy)
|
void |
setTimeout(TimeSpan timeout)
|
void |
stopFetchProgress(boolean stop)
Set if the fetch process should be stopped. |
abstract boolean |
updateBlobIfNotModified(BlobProperties blobProperties,
BlobContents contents)
Updates an existing blob if it has not been modified since the specified time which is typically the last modified time of the blob when you retrieved it. |
abstract void |
updateBlobMetadata(BlobProperties blobProperties)
Set the metadata of an existing blob. |
abstract boolean |
updateBlobMetadataIfNotModified(BlobProperties blobProperties)
Set the metadata of an existing blob if it has not been modified since it was last retrieved. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public abstract boolean createBlob(BlobProperties blobProperties,
BlobContents blobContents,
boolean overwrite)
throws StorageException
blobProperties - The properties of the blobblobContents - The contents of the bloboverwrite - Should this request overwrite an existing blob
StorageException
public abstract boolean updateBlobIfNotModified(BlobProperties blobProperties,
BlobContents contents)
throws StorageException
blobProperties - The properties of the blob. This object should be one
previously obtained from a call to GetBlob or
GetBlobProperties and have its LastModifiedTime property set.contents - The contents of the blob. The contents of the blob should be
readable
StorageException
public abstract void updateBlobMetadata(BlobProperties blobProperties)
throws StorageException
blobProperties - The blob properties object whose metadata is to be updated
StorageException
public abstract boolean updateBlobMetadataIfNotModified(BlobProperties blobProperties)
throws StorageException
blobProperties - The blob properties object whose metadata is to be updated.
Typically obtained by a previous call to GetBlob or
GetBlobProperties
StorageException
public abstract boolean createContainer()
throws StorageException
StorageStorageException
StorageException
public abstract boolean createContainer(NameValueCollection metadata,
ContainerAccessControl accessControl)
throws StorageException
metadata - The metadata for the container. Can be null to indicate no
metadataaccessControl - The access control (public or private) with which to create
the container
StorageException
public abstract BlobProperties getBlob(java.lang.String name,
BlobContents blobContents,
boolean transferAsChunks)
throws StorageException
name - The name of the blobblobContents - Object in which the contents are returned. This object should
contain a writable stream or should be a default constructed
object.transferAsChunks - Should the blob be gotten in pieces. This requires more
round-trips, but will retry smaller pieces in case of failure.
StorageException
public abstract boolean getBlobIfModified(BlobProperties blobProperties,
BlobContents blobContents,
boolean transferAsChunks)
throws StorageException
blobProperties - The properties of the blob obtained from an earlier call to
GetBlob. This parameter is updated by the call if the blob has
been modifiedblobContents - Contains the stream to which the contents of the blob are
written if it has been modifiedtransferAsChunks - Should the blob be gotten in pieces. This requires more
round-trips, but will retry smaller pieces in case of failure.
StorageException
public abstract BlobProperties getBlobProperties(java.lang.String name)
throws StorageException
name - The name of the blob
StorageException
public abstract boolean deleteContainer()
throws StorageException
StorageException
public abstract boolean doesContainerExist()
throws StorageException
StorageException
public abstract boolean doesBlobExist(java.lang.String blobName)
throws StorageException
Name - of the BLOB.
StorageException
public abstract java.util.Collection<BlobProperties> listBlobs(java.lang.String prefix,
boolean combineCommonPrefixes)
throws StorageException
prefix - combineCommonPrefixes - If true common prefixes with "/" as separator
StorageException
public abstract java.util.Collection<BlobProperties> listBlobs(java.lang.String prefix,
boolean combineCommonPrefixes,
int maxResults)
throws StorageException
prefix - combineCommonPrefixes - If true common prefixes with "/" as separatormaxResults - Specifies the maximum number of blobs to return per call to
Azure storage. This does NOT affect list size returned by this
function.
StorageException
public abstract void setContainerAccessControl(ContainerAccessControl acl)
throws StorageException
acl - The permission to set
StorageException
public abstract ContainerAccessControl getContainerAccessControl()
throws StorageException
StorageException
public abstract ContainerProperties getContainerProperties()
throws StorageException
StorageException
public abstract boolean copyBlob(java.lang.String destContainer,
java.lang.String destBlobName,
java.lang.String sourceBlobName)
throws StorageException
destContainer - the destination blob container;destBlobName - the destination blob's name;sourceBlobName - the source blob's name;
StorageException
public abstract boolean copyBlob(java.lang.String destContainer,
java.lang.String destBlobName,
java.lang.String sourceBlobName,
NameValueCollection metadata,
BlobConstraints constraints)
throws StorageException
destContainer - the destination blob container;destBlobName - the destination blob's name;sourceBlobName - the source blob's name;metadata - The metadata for the Blob. Can be null to indicate no
metadata;constraints - The blob constraints for the blob copy operation.
StorageException
public abstract boolean deleteBlob(java.lang.String name)
throws StorageException
name - The name of the blob
StorageException
public abstract boolean deleteBlobIfNotModified(BlobProperties blob)
throws StorageException
blob - A blob object (typically previously obtained from a GetBlob
call)
StorageExceptionpublic java.net.URI getBaseUri()
public java.lang.String getAccountName()
public java.lang.String getContainerName()
public boolean isUsePathStyleUris()
public java.net.URI getContainerUri()
public java.sql.Timestamp getLastModifiedTime()
public TimeSpan getTimeout()
public RetryPolicy getRetryPolicy()
public void setTimeout(TimeSpan timeout)
timeout - The time out for each request to the storage service.public void setRetryPolicy(RetryPolicy retryPolicy)
retryPolicy - The retry policy used for retrying requests.public void setContainerUri(java.net.URI containerUri)
containerUri - The URI of the container.public void stopFetchProgress(boolean stop)
stop - public boolean isStopped()
public long getBlockSize()
public void setBlockSize(long blockSize)
blockSize - The size of the blob.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||