@ DoesServiceRequest public boolean createIfNotExists ( QueueRequestOptions options , OperationContext opContext ) throws StorageException { options = QueueRequestOptions . populateAndApplyDefaults ( options , this . queueServiceClient ) ; boolean exists = this . exists ( true , options , opContext ) ; if ( exists ) { return false ; } else { try { this . create ( options , opContext ) ; return true ; } catch ( StorageException e ) { if ( e . getHttpStatusCode ( ) == HttpURLConnection . HTTP_CONFLICT && StorageErrorCodeStrings . QUEUE_ALREADY_EXISTS . equals ( e . getErrorCode ( ) ) ) { return false ; } else { throw e ; } } } }
Creates the queue if it does not already exist using the specified request options and operation context .