microsoft-azure-storage/src/com/microsoft/azure/storage/queue/CloudQueue.java
@DoesServiceRequest
    public Iterable<CloudQueueMessage> retrieveMessages(final int numberOfMessages,
            final int visibilityTimeoutInSeconds, QueueRequestOptions options, OperationContext opContext)
            throws StorageException {
        Utility.assertInBounds("numberOfMessages", numberOfMessages, 1, QueueConstants.MAX_NUMBER_OF_MESSAGES_TO_PEEK);
        Utility.assertInBounds("visibilityTimeoutInSeconds", visibilityTimeoutInSeconds, 0,
                QueueConstants.MAX_TIME_TO_LIVE_IN_SECONDS);

        if (opContext == null) {
            opContext = new OperationContext();
        }

        opContext.initialize();
        options = QueueRequestOptions.populateAndApplyDefaults(options, this.queueServiceClient);

        return ExecutionEngine.executeWithRetry(this.queueServiceClient, this,
                this.retrieveMessagesImpl(numberOfMessages, visibilityTimeoutInSeconds, options),
                options.getRetryPolicyFactory(), opContext);
    }
@DoesServiceRequest
    public Iterable<CloudQueueMessage> retrieveMessages(final int numberOfMessages,
            final int visibilityTimeoutInSeconds, QueueRequestOptions options, OperationContext opContext)
            throws StorageException {
        Utility.assertInBounds("numberOfMessages", numberOfMessages, 1, QueueConstants.MAX_NUMBER_OF_MESSAGES_TO_PEEK);
        Utility.assertInBounds("visibilityTimeoutInSeconds", visibilityTimeoutInSeconds, 0,
                QueueConstants.MAX_TIME_TO_LIVE_IN_SECONDS);

        if (opContext == null) {
            opContext = new OperationContext();
        }

        opContext.initialize();
        options = QueueRequestOptions.populateAndApplyDefaults(options, this.queueServiceClient);

        return ExecutionEngine.executeWithRetry(this.queueServiceClient, this,
                this.retrieveMessagesImpl(numberOfMessages, visibilityTimeoutInSeconds, options),
                options.getRetryPolicyFactory(), opContext);
    }
@ DoesServiceRequest public Iterable < CloudQueueMessage > retrieveMessages ( final int numberOfMessages , final int visibilityTimeoutInSeconds , QueueRequestOptions options , OperationContext opContext ) throws StorageException { Utility . assertInBounds ( "numberOfMessages" , numberOfMessages , 1 , QueueConstants . MAX_NUMBER_OF_MESSAGES_TO_PEEK ) ; Utility . assertInBounds ( "visibilityTimeoutInSeconds" , visibilityTimeoutInSeconds , 0 , QueueConstants . MAX_TIME_TO_LIVE_IN_SECONDS ) ; if ( opContext == null ) { opContext = new OperationContext ( ) ; } opContext . initialize ( ) ; options = QueueRequestOptions . populateAndApplyDefaults ( options , this . queueServiceClient ) ; return ExecutionEngine . executeWithRetry ( this . queueServiceClient , this , this . retrieveMessagesImpl ( numberOfMessages , visibilityTimeoutInSeconds , options ) , options . getRetryPolicyFactory ( ) , 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.

@param numberOfMessages
The number of messages to retrieve.

@param visibilityTimeoutInSeconds
Specifies the visibility timeout for the retrieved messages, in seconds.

@param options
A {@link QueueRequestOptions} object that specifies any additional options for the request. Specifying
<code>null</code> will use the default request options from the associated service client (
{@link CloudQueueClient}).
@param opContext
An {@link 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.

@return An enumerable collection of {@link CloudQueueMessage} objects that represents the messages retrieved from
the queue.

@throws StorageException
If a storage service error occurred during the operation.
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 .