CloudQueue Class

  • java.lang.Object
    • com.microsoft.azure.storage.queue.CloudQueue

public class CloudQueue

This class represents a queue in the Microsoft Azure Queue service.

Constructor Summary

Constructor Description
CloudQueue(final StorageUri uri)

Creates an instance of the class using the specified queue . The queue must include a SAS token.

CloudQueue(final StorageUri uri, final StorageCredentials credentials)

Creates an instance of the class using the specified queue and credentials. If the contains a SAS token, the credentials must be .

CloudQueue(final String queueName, final CloudQueueClient client)

Creates an instance of the class using the specified name and client.

CloudQueue(final URI uri)

Creates an instance of the class using the specified queue URI. The queue must include a SAS token.

CloudQueue(final URI uri, final StorageCredentials credentials)

Creates an instance of the class using the specified queue and credentials. If the contains a SAS token, the credentials must be .

Method Summary

Modifier and Type Method and Description
void addMessage(final CloudQueueMessage message)

Adds a message to the back of the queue.

void addMessage(final CloudQueueMessage message, final int timeToLiveInSeconds, final int initialVisibilityDelayInSeconds, QueueRequestOptions options, OperationContext opContext)

Adds a message to the back of the queue with the specified options.

void clear()

Clears all messages from the queue.

void clear(QueueRequestOptions options, OperationContext opContext)

Clears all messages from the queue, using the specified request options and operation context.

void create()

Creates the queue.

void create(QueueRequestOptions options, OperationContext opContext)

Creates the queue, using the specified request options and operation context.

boolean createIfNotExists()

Creates the queue if it does not already exist.

boolean createIfNotExists(QueueRequestOptions options, OperationContext opContext)

Creates the queue if it does not already exist, using the specified request options and operation context.

void delete()

Deletes the queue.

void delete(QueueRequestOptions options, OperationContext opContext)

Deletes the queue, using the specified request options and operation context.

boolean deleteIfExists()

Deletes the queue if it exists.

boolean deleteIfExists(QueueRequestOptions options, OperationContext opContext)

Deletes the queue if it exists, using the specified request options and operation context.

void deleteMessage(final CloudQueueMessage message)

Deletes the specified message from the queue.

void deleteMessage(final CloudQueueMessage message, QueueRequestOptions options, OperationContext opContext)

Deletes the specified message from the queue, using the specified request options and operation context.

void downloadAttributes()

Downloads the queue's metadata and approximate message count value.

void downloadAttributes(QueueRequestOptions options, OperationContext opContext)

Downloads the queue's metadata and approximate message count value, using the specified request options and operation context.

QueuePermissions downloadPermissions()

Downloads the permission settings for the queue.

QueuePermissions downloadPermissions(QueueRequestOptions options, OperationContext opContext)

Downloads the permissions settings for the queue using the specified request options and operation context.

boolean exists()

Returns a value that indicates whether the queue exists.

boolean exists(QueueRequestOptions options, OperationContext opContext)

Returns a value that indicates whether the queue existse, using the specified request options and operation context.

String generateSharedAccessSignature(final SharedAccessQueuePolicy policy, final String groupPolicyIdentifier)

Returns a shared access signature for the queue.

String generateSharedAccessSignature(final SharedAccessQueuePolicy policy, final String groupPolicyIdentifier, final IPRange ipRange, final SharedAccessProtocols protocols)

Returns a shared access signature for the queue.

long getApproximateMessageCount()

Gets the approximate messages count of the queue. This value is initialized by a request to downloadAttributes() and represents the approximate message count when that request completed.

HashMap<String, String> getMetadata()

Gets the metadata collection for the queue as stored in this object. This value is initialized with the metadata from the queue by a call to downloadAttributes(), and is set on the queue with a call to uploadMetadata().

String getName()

Gets the name of the queue.

CloudQueueClient getServiceClient()

Gets the queue service client associated with this queue.

boolean getShouldEncodeMessage()

Gets the value indicating whether the message should be base-64 encoded.

final StorageUri getStorageUri()

Returns the list of URIs for all locations.

URI getUri()

Gets the absolute URI for this queue.

CloudQueueMessage peekMessage()

Peeks a message from the queue. A peek request retrieves a message from the front of the queue without changing its visibility.

CloudQueueMessage peekMessage(final QueueRequestOptions options, final OperationContext opContext)

Peeks a message from the queue, using the specified request options and operation context. A peek request retrieves a message from the front of the queue without changing its visibility.

Iterable<CloudQueueMessage> peekMessages(final int numberOfMessages)

Peeks a specified number of messages from the queue. A peek request retrieves messages from the front of the queue without changing their visibility.

Iterable<CloudQueueMessage> peekMessages(final int numberOfMessages, QueueRequestOptions options, OperationContext opContext)

Peeks a set of messages from the queue, using the specified request options and operation context. A peek request retrieves messages from the front of the queue without changing their visibility.

CloudQueueMessage retrieveMessage()

Retrieves a message from the front of the queue using the default request options. This operation marks the retrieved message as invisible in the queue for the default visibility timeout period.

CloudQueueMessage retrieveMessage(final int visibilityTimeoutInSeconds, final QueueRequestOptions options, final OperationContext opContext)

Retrieves a message from the front of the queue, using the specified request options and operation context. This operation marks the retrieved message as invisible in the queue for the specified visibility timeout period.

Iterable<CloudQueueMessage> retrieveMessages(final int numberOfMessages)

Retrieves the specified number of messages from the front of the queue using the default request options. This operation marks the retrieved messages as invisible in the queue for the default visibility timeout period.

Iterable<CloudQueueMessage> retrieveMessages(final int numberOfMessages, final int visibilityTimeoutInSeconds, QueueRequestOptions options, OperationContext opContext)

Retrieves the specified number of messages from the front of the queue using the specified request options and operation context. This operation marks the retrieved messages as invisible in the queue for the default visibility timeout period.

void setMetadata(final HashMap<String, String> metadata)

Sets the metadata collection of name-value pairs to be set on the queue with an uploadMetadata() call. This collection will overwrite any existing queue metadata. If this is set to an empty collection, the queue metadata will be cleared on an uploadMetadata() call.

void setShouldEncodeMessage(final boolean shouldEncodeMessage)

Sets the flag indicating whether the message should be base-64 encoded.

void updateMessage(final CloudQueueMessage message, final int visibilityTimeoutInSeconds)

Updates the specified message in the queue with a new visibility timeout value in seconds.

void updateMessage(final CloudQueueMessage message, final int visibilityTimeoutInSeconds, final EnumSet<MessageUpdateFields> messageUpdateFields, QueueRequestOptions options, OperationContext opContext)

Updates a message in the queue, using the specified request options and operation context.

void uploadMetadata()

Uploads the metadata in the object to the queue.

void uploadMetadata(QueueRequestOptions options, OperationContext opContext)

Uploads the metadata in the object to the queue, using the specified request options and operation context.

void uploadPermissions(final QueuePermissions permissions)

Uploads the queue's permissions.

void uploadPermissions(final QueuePermissions permissions, QueueRequestOptions options, OperationContext opContext)

Uploads the queue's permissions using the specified request options and operation context.

Constructor Details

CloudQueue

public CloudQueue(final StorageUri uri)

Creates an instance of the class using the specified queue . The queue must include a SAS token.

Parameters:

uri - A StorageUri object that represents the absolute URI of the queue.

Throws:

StorageException - If a storage service error occurred.

CloudQueue

public CloudQueue(final StorageUri uri, final StorageCredentials credentials)

Creates an instance of the class using the specified queue and credentials. If the contains a SAS token, the credentials must be .

Parameters:

uri - A StorageUri object that represents the absolute URI of the queue.
credentials - A StorageCredentials object used to authenticate access.

Throws:

StorageException - If a storage service error occurred.

CloudQueue

protected CloudQueue(final String queueName, final CloudQueueClient client)

Creates an instance of the class using the specified name and client.

Parameters:

queueName - The name of the queue, which must adhere to queue naming rules. The queue name should not include any path separator characters (/). Queue names must be lowercase, between 3-63 characters long and must start with a letter or number. Queue names may contain only letters, numbers, and the dash (-) character.
client - A CloudQueueClient object that represents the associated service client, and that specifies the endpoint for the Queue service.

Throws:

URISyntaxException - If the resource URI constructed based on the queueName is invalid.
StorageException - If a storage service error occurred.

CloudQueue

public CloudQueue(final URI uri)

Creates an instance of the class using the specified queue URI. The queue must include a SAS token.

Parameters:

uri - A java.net.URI object that represents the absolute URI of the queue.

Throws:

StorageException - If a storage service error occurred.

CloudQueue

public CloudQueue(final URI uri, final StorageCredentials credentials)

Creates an instance of the class using the specified queue and credentials. If the contains a SAS token, the credentials must be .

Parameters:

uri - A java.net.URI object that represents the absolute URI of the queue.
credentials - A StorageCredentials object used to authenticate access.

Throws:

StorageException - If a storage service error occurred.

Method Details

addMessage

public void addMessage(final CloudQueueMessage message)

Adds a message to the back of the queue.

Parameters:

message - A CloudQueueMessage object that specifies the message to add. The message object is modified to include the message ID and pop receipt, and can be used in subsequent calls to updateMessage and deleteMessage.

Throws:

StorageException - If a storage service error occurred during the operation.

addMessage

public void addMessage(final CloudQueueMessage message, final int timeToLiveInSeconds, final int initialVisibilityDelayInSeconds, QueueRequestOptions options, OperationContext opContext)

Adds a message to the back of the queue with the specified options.

Parameters:

message - A CloudQueueMessage object that specifies the message to add. The message object is modified to include the message ID and pop receipt, and can be used in subsequent calls to updateMessage and deleteMessage.
timeToLiveInSeconds - The maximum time to allow the message to be in the queue. A value of zero will set the time-to-live to the service default value of seven days. A value of negative one will set an infinite time-to-live.
initialVisibilityDelayInSeconds - The length of time during which the message will be invisible, starting when it is added to the queue, or 0 to make the message visible immediately. This value must be greater than or equal to zero and less than the time-to-live value.
options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

clear

public void clear()

Clears all messages from the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

clear

public void clear(QueueRequestOptions options, OperationContext opContext)

Clears all messages from the queue, using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

create

public void create()

Creates the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

create

public void create(QueueRequestOptions options, OperationContext opContext)

Creates the queue, using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

createIfNotExists

public boolean createIfNotExists()

Creates the queue if it does not already exist.

Returns:

A value of true if the queue is created in the storage service, otherwise false

Throws:

StorageException - If a storage service error occurred during the operation.

createIfNotExists

public boolean createIfNotExists(QueueRequestOptions options, OperationContext opContext)

Creates the queue if it does not already exist, using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

A value of true if the queue is created in the storage service, otherwise false

Throws:

StorageException - If a storage service error occurred during the operation.

delete

public void delete()

Deletes the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

delete

public void delete(QueueRequestOptions options, OperationContext opContext)

Deletes the queue, using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

deleteIfExists

public boolean deleteIfExists()

Deletes the queue if it exists.

Returns:

A value of true if the queue existed in the storage service and has been deleted, otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

deleteIfExists

public boolean deleteIfExists(QueueRequestOptions options, OperationContext opContext)

Deletes the queue if it exists, using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

A value of true if the queue existed in the storage service and has been deleted, otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

deleteMessage

public void deleteMessage(final CloudQueueMessage message)

Deletes the specified message from the queue.

Parameters:

message - A CloudQueueMessage object that specifies the message to delete.

Throws:

StorageException - If a storage service error occurred during the operation.

deleteMessage

public void deleteMessage(final CloudQueueMessage message, QueueRequestOptions options, OperationContext opContext)

Deletes the specified message from the queue, using the specified request options and operation context.

Parameters:

message - A CloudQueueMessage object that specifies the message to delete.
options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

downloadAttributes

public void downloadAttributes()

Downloads the queue's metadata and approximate message count value.

Throws:

StorageException - If a storage service error occurred during the operation.

downloadAttributes

public void downloadAttributes(QueueRequestOptions options, OperationContext opContext)

Downloads the queue's metadata and approximate message count value, using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueue).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

downloadPermissions

public QueuePermissions downloadPermissions()

Downloads the permission settings for the queue.

Returns:

A QueuePermissions object that represents the queue's permissions.

Throws:

StorageException - If a storage service error occurred.

downloadPermissions

public QueuePermissions downloadPermissions(QueueRequestOptions options, OperationContext opContext)

Downloads the permissions settings for the queue using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

A QueuePermissions object that represents the container's permissions.

Throws:

StorageException - If a storage service error occurred.

exists

public boolean exists()

Returns a value that indicates whether the queue exists.

Returns:

true if the queue exists in the storage service, otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

exists

public boolean exists(QueueRequestOptions options, OperationContext opContext)

Returns a value that indicates whether the queue existse, using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

true if the queue exists in the storage service, otherwise false.

Throws:

StorageException - If a storage service error occurred during the operation.

generateSharedAccessSignature

public String generateSharedAccessSignature(final SharedAccessQueuePolicy policy, final String groupPolicyIdentifier)

Returns a shared access signature for the queue.

Parameters:

policy - The access policy for the shared access signature.
groupPolicyIdentifier - A queue-level access policy.

Returns:

A shared access signature for the queue.

Throws:

InvalidKeyException - If an invalid key was passed.
StorageException - If a storage service error occurred.
IllegalArgumentException - If an unexpected value is passed.

generateSharedAccessSignature

public String generateSharedAccessSignature(final SharedAccessQueuePolicy policy, final String groupPolicyIdentifier, final IPRange ipRange, final SharedAccessProtocols protocols)

Returns a shared access signature for the queue.

Parameters:

policy - The access policy for the shared access signature.
groupPolicyIdentifier - A queue-level access policy.
ipRange - A IPRange object containing the range of allowed IP addresses.
protocols - A SharedAccessProtocols representing the allowed Internet protocols.

Returns:

A shared access signature for the queue.

Throws:

InvalidKeyException - If an invalid key was passed.
StorageException - If a storage service error occurred.
IllegalArgumentException - If an unexpected value is passed.

getApproximateMessageCount

public long getApproximateMessageCount()

Gets the approximate messages count of the queue. This value is initialized by a request to downloadAttributes() and represents the approximate message count when that request completed.

Returns:

A Long object that represents the approximate messages count of the queue.

getMetadata

public HashMap getMetadata()

Gets the metadata collection for the queue as stored in this object. This value is initialized with the metadata from the queue by a call to downloadAttributes(), and is set on the queue with a call to uploadMetadata().

Returns:

A java.util.HashMap object that represents the metadata for the queue.

getName

public String getName()

Gets the name of the queue.

Returns:

A String object that represents the name of the queue.

getServiceClient

public CloudQueueClient getServiceClient()

Gets the queue service client associated with this queue.

Returns:

A CloudQueueClient object that represents the service client associated with this queue.

getShouldEncodeMessage

public boolean getShouldEncodeMessage()

Gets the value indicating whether the message should be base-64 encoded.

Returns:

A Boolean that represents whether the message should be base-64 encoded.

getStorageUri

public final StorageUri getStorageUri()

Returns the list of URIs for all locations.

Returns:

A StorageUri that represents the list of URIs for all locations..

getUri

public URI getUri()

Gets the absolute URI for this queue.

Returns:

A java.net.URI object that represents the URI for this queue.

peekMessage

public CloudQueueMessage peekMessage()

Peeks a message from the queue. A peek request retrieves a message from the front of the queue without changing its visibility.

Returns:

An CloudQueueMessage object that represents a message in this queue.

Throws:

StorageException - If a storage service error occurred during the operation.

peekMessage

public CloudQueueMessage peekMessage(final QueueRequestOptions options, final OperationContext opContext)

Peeks a message from the queue, using the specified request options and operation context. A peek request retrieves a message from the front of the queue without changing its visibility.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

An CloudQueueMessage object that represents the requested message from the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

peekMessages

public Iterable peekMessages(final int numberOfMessages)

Peeks a specified number of messages from the queue. A peek request retrieves messages from the front of the queue without changing their visibility.

Parameters:

numberOfMessages - The number of messages to retrieve.

Returns:

An enumerable collection of CloudQueueMessage objects that represents the requested messages from the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

peekMessages

public Iterable peekMessages(final int numberOfMessages, QueueRequestOptions options, OperationContext opContext)

Peeks a set of messages from the queue, using the specified request options and operation context. A peek request retrieves messages from the front of the queue without changing their visibility.

Parameters:

numberOfMessages - The number of messages to retrieve.
options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

An enumerable collection of CloudQueueMessage objects that represents the requested messages from the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

retrieveMessage

public CloudQueueMessage retrieveMessage()

Retrieves a message from the front of the queue using the default request options. This operation marks the retrieved message as invisible in the queue for the default visibility timeout period.

Returns:

An CloudQueueMessage object that represents a message in this queue.

Throws:

StorageException - If a storage service error occurred during the operation.

retrieveMessage

public CloudQueueMessage retrieveMessage(final int visibilityTimeoutInSeconds, final QueueRequestOptions options, final OperationContext opContext)

Retrieves a message from the front of the queue, using the specified request options and operation context. This operation marks the retrieved message as invisible in the queue for the specified visibility timeout period.

Parameters:

visibilityTimeoutInSeconds - Specifies the visibility timeout for the message, in seconds.
options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

An CloudQueueMessage object that represents a message in this queue.

Throws:

StorageException - If a storage service error occurred during the operation.

retrieveMessages

public Iterable retrieveMessages(final int numberOfMessages)

Retrieves the specified number of messages from the front of the queue using the default request options. This operation marks the retrieved messages as invisible in the queue for the default visibility timeout period.

Parameters:

numberOfMessages - The number of messages to retrieve.

Returns:

An enumerable collection of CloudQueueMessage objects that represents the retrieved messages from the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

retrieveMessages

public Iterable retrieveMessages(final int numberOfMessages, final int visibilityTimeoutInSeconds, QueueRequestOptions options, OperationContext opContext)

Retrieves the specified number of messages from the front of the queue using the specified request options and operation context. This operation marks the retrieved messages as invisible in the queue for the default visibility timeout period.

Parameters:

numberOfMessages - The number of messages to retrieve.
visibilityTimeoutInSeconds - Specifies the visibility timeout for the retrieved messages, in seconds.
options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Returns:

An enumerable collection of CloudQueueMessage objects that represents the messages retrieved from the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

setMetadata

public void setMetadata(final HashMap metadata)

Sets the metadata collection of name-value pairs to be set on the queue with an uploadMetadata() call. This collection will overwrite any existing queue metadata. If this is set to an empty collection, the queue metadata will be cleared on an uploadMetadata() call.

Parameters:

metadata - A java.util.HashMap object that represents the metadata being assigned to the queue.

setShouldEncodeMessage

public void setShouldEncodeMessage(final boolean shouldEncodeMessage)

Sets the flag indicating whether the message should be base-64 encoded.

Parameters:

shouldEncodeMessage - The value indicates whether the message should be base-64 encoded.

updateMessage

public void updateMessage(final CloudQueueMessage message, final int visibilityTimeoutInSeconds)

Updates the specified message in the queue with a new visibility timeout value in seconds.

Parameters:

message - The CloudQueueMessage to update in the queue.
visibilityTimeoutInSeconds - Specifies the new visibility timeout for the message, in seconds.

Throws:

StorageException - If a storage service error occurred during the operation.

updateMessage

public void updateMessage(final CloudQueueMessage message, final int visibilityTimeoutInSeconds, final EnumSet messageUpdateFields, QueueRequestOptions options, OperationContext opContext)

Updates a message in the queue, using the specified request options and operation context.

Parameters:

message - The CloudQueueMessage to update in the queue.
visibilityTimeoutInSeconds - Specifies the new visibility timeout for the message, in seconds.
messageUpdateFields - An EnumSet of MessageUpdateFields values that specifies which parts of the message are to be updated.
options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

uploadMetadata

public void uploadMetadata()

Uploads the metadata in the object to the queue.

Throws:

StorageException - If a storage service error occurred during the operation.

uploadMetadata

public void uploadMetadata(QueueRequestOptions options, OperationContext opContext)

Uploads the metadata in the object to the queue, using the specified request options and operation context.

Parameters:

options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred during the operation.

uploadPermissions

public void uploadPermissions(final QueuePermissions permissions)

Uploads the queue's permissions.

Parameters:

permissions - A QueuePermissions object that represents the permissions to upload.

Throws:

StorageException - If a storage service error occurred.

uploadPermissions

public void uploadPermissions(final QueuePermissions permissions, QueueRequestOptions options, OperationContext opContext)

Uploads the queue's permissions using the specified request options and operation context.

Parameters:

permissions - A QueuePermissions object that represents the permissions to upload.
options - A QueueRequestOptions object that specifies any additional options for the request. Specifying null will use the default request options from the associated service client ( CloudQueueClient).
opContext - An OperationContext object that represents the context for the current operation. This object is used to track requests to the storage service, and to provide additional runtime information about the operation.

Throws:

StorageException - If a storage service error occurred.

Applies to