本文整理了Java中com.amazonaws.services.sqs.model.ReceiveMessageRequest.getMaxNumberOfMessages
方法的一些代码示例,展示了ReceiveMessageRequest.getMaxNumberOfMessages
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReceiveMessageRequest.getMaxNumberOfMessages
方法的具体详情如下:
包路径:com.amazonaws.services.sqs.model.ReceiveMessageRequest
类名称:ReceiveMessageRequest
方法名:getMaxNumberOfMessages
[英]The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.
[中]要返回的最大消息数。Amazon SQS不会返回超过此值的消息(但是,返回的消息可能会更少)。有效值:1到10。默认值:1。
代码示例来源:origin: aws/aws-sdk-java
/**
* Submits the request for retrieval of messages from the queue and returns a future that will
* be signalled when the request is satisfied. The future may already be signalled by the time
* it is returned.
*
* @return never null
*/
public QueueBufferFuture<ReceiveMessageRequest, ReceiveMessageResult> receiveMessageAsync(ReceiveMessageRequest rq,
QueueBufferCallback<ReceiveMessageRequest, ReceiveMessageResult> callback) {
if (shutDown) {
throw new AmazonClientException("The client has been shut down.");
}
// issue the future...
int numMessages = 10;
if (rq.getMaxNumberOfMessages() != null) {
numMessages = rq.getMaxNumberOfMessages();
}
QueueBufferFuture<ReceiveMessageRequest, ReceiveMessageResult> toReturn = issueFuture(numMessages, callback);
// attempt to satisfy it right away...
satisfyFuturesFromBuffer();
// spawn more receive tasks if we need them...
spawnMoreReceiveTasks();
return toReturn;
}
代码示例来源:origin: aws/aws-sdk-java
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getQueueUrl() != null)
sb.append("QueueUrl: ").append(getQueueUrl()).append(",");
if (getAttributeNames() != null)
sb.append("AttributeNames: ").append(getAttributeNames()).append(",");
if (getMessageAttributeNames() != null)
sb.append("MessageAttributeNames: ").append(getMessageAttributeNames()).append(",");
if (getMaxNumberOfMessages() != null)
sb.append("MaxNumberOfMessages: ").append(getMaxNumberOfMessages()).append(",");
if (getVisibilityTimeout() != null)
sb.append("VisibilityTimeout: ").append(getVisibilityTimeout()).append(",");
if (getWaitTimeSeconds() != null)
sb.append("WaitTimeSeconds: ").append(getWaitTimeSeconds()).append(",");
if (getReceiveRequestAttemptId() != null)
sb.append("ReceiveRequestAttemptId: ").append(getReceiveRequestAttemptId());
sb.append("}");
return sb.toString();
}
代码示例来源:origin: aws/aws-sdk-java
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getQueueUrl() == null) ? 0 : getQueueUrl().hashCode());
hashCode = prime * hashCode + ((getAttributeNames() == null) ? 0 : getAttributeNames().hashCode());
hashCode = prime * hashCode + ((getMessageAttributeNames() == null) ? 0 : getMessageAttributeNames().hashCode());
hashCode = prime * hashCode + ((getMaxNumberOfMessages() == null) ? 0 : getMaxNumberOfMessages().hashCode());
hashCode = prime * hashCode + ((getVisibilityTimeout() == null) ? 0 : getVisibilityTimeout().hashCode());
hashCode = prime * hashCode + ((getWaitTimeSeconds() == null) ? 0 : getWaitTimeSeconds().hashCode());
hashCode = prime * hashCode + ((getReceiveRequestAttemptId() == null) ? 0 : getReceiveRequestAttemptId().hashCode());
return hashCode;
}
代码示例来源:origin: aws/aws-sdk-java
if (other.getMessageAttributeNames() != null && other.getMessageAttributeNames().equals(this.getMessageAttributeNames()) == false)
return false;
if (other.getMaxNumberOfMessages() == null ^ this.getMaxNumberOfMessages() == null)
return false;
if (other.getMaxNumberOfMessages() != null && other.getMaxNumberOfMessages().equals(this.getMaxNumberOfMessages()) == false)
return false;
if (other.getVisibilityTimeout() == null ^ this.getVisibilityTimeout() == null)
代码示例来源:origin: aws/aws-sdk-java
if (receiveMessageRequest.getMaxNumberOfMessages() != null) {
request.addParameter("MaxNumberOfMessages", StringUtils.fromInteger(receiveMessageRequest.getMaxNumberOfMessages()));
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Submits the request for retrieval of messages from the queue and returns
* a future that will be signalled when the request is satisfied. The future
* may already be signalled by the time it is returned.
*
* @return never null
*/
public QueueBufferFuture<ReceiveMessageRequest, ReceiveMessageResult>
receiveMessageAsync(ReceiveMessageRequest rq,
QueueBufferCallback<ReceiveMessageRequest, ReceiveMessageResult> callback) {
if (shutDown) {
throw new AmazonClientException("The client has been shut down.");
}
// issue the future...
int numMessages = 10;
if (rq.getMaxNumberOfMessages() != null) {
numMessages = rq.getMaxNumberOfMessages();
}
QueueBufferFuture<ReceiveMessageRequest, ReceiveMessageResult> toReturn = issueFuture(
numMessages, callback);
// attempt to satisfy it right away...
satisfyFuturesFromBuffer();
// spawn more receive tasks if we need them...
spawnMoreReceiveTasks();
return toReturn;
}
代码示例来源:origin: aws-amplify/aws-sdk-android
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getQueueUrl() != null)
sb.append("QueueUrl: " + getQueueUrl() + ",");
if (getAttributeNames() != null)
sb.append("AttributeNames: " + getAttributeNames() + ",");
if (getMessageAttributeNames() != null)
sb.append("MessageAttributeNames: " + getMessageAttributeNames() + ",");
if (getMaxNumberOfMessages() != null)
sb.append("MaxNumberOfMessages: " + getMaxNumberOfMessages() + ",");
if (getVisibilityTimeout() != null)
sb.append("VisibilityTimeout: " + getVisibilityTimeout() + ",");
if (getWaitTimeSeconds() != null)
sb.append("WaitTimeSeconds: " + getWaitTimeSeconds() + ",");
if (getReceiveRequestAttemptId() != null)
sb.append("ReceiveRequestAttemptId: " + getReceiveRequestAttemptId());
sb.append("}");
return sb.toString();
}
代码示例来源:origin: aws-amplify/aws-sdk-android
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getQueueUrl() == null) ? 0 : getQueueUrl().hashCode());
hashCode = prime * hashCode
+ ((getAttributeNames() == null) ? 0 : getAttributeNames().hashCode());
hashCode = prime
* hashCode
+ ((getMessageAttributeNames() == null) ? 0 : getMessageAttributeNames().hashCode());
hashCode = prime * hashCode
+ ((getMaxNumberOfMessages() == null) ? 0 : getMaxNumberOfMessages().hashCode());
hashCode = prime * hashCode
+ ((getVisibilityTimeout() == null) ? 0 : getVisibilityTimeout().hashCode());
hashCode = prime * hashCode
+ ((getWaitTimeSeconds() == null) ? 0 : getWaitTimeSeconds().hashCode());
hashCode = prime
* hashCode
+ ((getReceiveRequestAttemptId() == null) ? 0 : getReceiveRequestAttemptId()
.hashCode());
return hashCode;
}
代码示例来源:origin: aws-amplify/aws-sdk-android
&& other.getMessageAttributeNames().equals(this.getMessageAttributeNames()) == false)
return false;
if (other.getMaxNumberOfMessages() == null ^ this.getMaxNumberOfMessages() == null)
return false;
if (other.getMaxNumberOfMessages() != null
&& other.getMaxNumberOfMessages().equals(this.getMaxNumberOfMessages()) == false)
return false;
if (other.getVisibilityTimeout() == null ^ this.getVisibilityTimeout() == null)
代码示例来源:origin: aws-amplify/aws-sdk-android
if (receiveMessageRequest.getMaxNumberOfMessages() != null) {
prefix = "MaxNumberOfMessages";
Integer maxNumberOfMessages = receiveMessageRequest.getMaxNumberOfMessages();
request.addParameter(prefix, StringUtils.fromInteger(maxNumberOfMessages));
代码示例来源:origin: com.amazonaws/aws-java-sdk-sqs
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getQueueUrl() != null)
sb.append("QueueUrl: ").append(getQueueUrl()).append(",");
if (getAttributeNames() != null)
sb.append("AttributeNames: ").append(getAttributeNames()).append(",");
if (getMessageAttributeNames() != null)
sb.append("MessageAttributeNames: ").append(getMessageAttributeNames()).append(",");
if (getMaxNumberOfMessages() != null)
sb.append("MaxNumberOfMessages: ").append(getMaxNumberOfMessages()).append(",");
if (getVisibilityTimeout() != null)
sb.append("VisibilityTimeout: ").append(getVisibilityTimeout()).append(",");
if (getWaitTimeSeconds() != null)
sb.append("WaitTimeSeconds: ").append(getWaitTimeSeconds()).append(",");
if (getReceiveRequestAttemptId() != null)
sb.append("ReceiveRequestAttemptId: ").append(getReceiveRequestAttemptId());
sb.append("}");
return sb.toString();
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-sqs
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getQueueUrl() == null) ? 0 : getQueueUrl().hashCode());
hashCode = prime * hashCode + ((getAttributeNames() == null) ? 0 : getAttributeNames().hashCode());
hashCode = prime * hashCode + ((getMessageAttributeNames() == null) ? 0 : getMessageAttributeNames().hashCode());
hashCode = prime * hashCode + ((getMaxNumberOfMessages() == null) ? 0 : getMaxNumberOfMessages().hashCode());
hashCode = prime * hashCode + ((getVisibilityTimeout() == null) ? 0 : getVisibilityTimeout().hashCode());
hashCode = prime * hashCode + ((getWaitTimeSeconds() == null) ? 0 : getWaitTimeSeconds().hashCode());
hashCode = prime * hashCode + ((getReceiveRequestAttemptId() == null) ? 0 : getReceiveRequestAttemptId().hashCode());
return hashCode;
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-sqs
/**
* Submits the request for retrieval of messages from the queue and returns a future that will
* be signalled when the request is satisfied. The future may already be signalled by the time
* it is returned.
*
* @return never null
*/
public QueueBufferFuture<ReceiveMessageRequest, ReceiveMessageResult> receiveMessageAsync(ReceiveMessageRequest rq,
QueueBufferCallback<ReceiveMessageRequest, ReceiveMessageResult> callback) {
if (shutDown) {
throw new AmazonClientException("The client has been shut down.");
}
// issue the future...
int numMessages = 10;
if (rq.getMaxNumberOfMessages() != null) {
numMessages = rq.getMaxNumberOfMessages();
}
QueueBufferFuture<ReceiveMessageRequest, ReceiveMessageResult> toReturn = issueFuture(numMessages, callback);
// attempt to satisfy it right away...
satisfyFuturesFromBuffer();
// spawn more receive tasks if we need them...
spawnMoreReceiveTasks();
return toReturn;
}
代码示例来源:origin: com.amazonaws/aws-android-sdk-sqs
/**
* Submits the request for retrieval of messages from the queue and returns
* a future that will be signalled when the request is satisfied. The future
* may already be signalled by the time it is returned.
*
* @return never null
*/
public QueueBufferFuture<ReceiveMessageRequest, ReceiveMessageResult>
receiveMessageAsync(ReceiveMessageRequest rq,
QueueBufferCallback<ReceiveMessageRequest, ReceiveMessageResult> callback) {
if (shutDown) {
throw new AmazonClientException("The client has been shut down.");
}
// issue the future...
int numMessages = 10;
if (rq.getMaxNumberOfMessages() != null) {
numMessages = rq.getMaxNumberOfMessages();
}
QueueBufferFuture<ReceiveMessageRequest, ReceiveMessageResult> toReturn = issueFuture(
numMessages, callback);
// attempt to satisfy it right away...
satisfyFuturesFromBuffer();
// spawn more receive tasks if we need them...
spawnMoreReceiveTasks();
return toReturn;
}
代码示例来源:origin: com.amazonaws/aws-android-sdk-sqs
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getQueueUrl() != null)
sb.append("QueueUrl: " + getQueueUrl() + ",");
if (getAttributeNames() != null)
sb.append("AttributeNames: " + getAttributeNames() + ",");
if (getMessageAttributeNames() != null)
sb.append("MessageAttributeNames: " + getMessageAttributeNames() + ",");
if (getMaxNumberOfMessages() != null)
sb.append("MaxNumberOfMessages: " + getMaxNumberOfMessages() + ",");
if (getVisibilityTimeout() != null)
sb.append("VisibilityTimeout: " + getVisibilityTimeout() + ",");
if (getWaitTimeSeconds() != null)
sb.append("WaitTimeSeconds: " + getWaitTimeSeconds() + ",");
if (getReceiveRequestAttemptId() != null)
sb.append("ReceiveRequestAttemptId: " + getReceiveRequestAttemptId());
sb.append("}");
return sb.toString();
}
代码示例来源:origin: com.amazonaws/aws-android-sdk-sqs
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getQueueUrl() == null) ? 0 : getQueueUrl().hashCode());
hashCode = prime * hashCode
+ ((getAttributeNames() == null) ? 0 : getAttributeNames().hashCode());
hashCode = prime
* hashCode
+ ((getMessageAttributeNames() == null) ? 0 : getMessageAttributeNames().hashCode());
hashCode = prime * hashCode
+ ((getMaxNumberOfMessages() == null) ? 0 : getMaxNumberOfMessages().hashCode());
hashCode = prime * hashCode
+ ((getVisibilityTimeout() == null) ? 0 : getVisibilityTimeout().hashCode());
hashCode = prime * hashCode
+ ((getWaitTimeSeconds() == null) ? 0 : getWaitTimeSeconds().hashCode());
hashCode = prime
* hashCode
+ ((getReceiveRequestAttemptId() == null) ? 0 : getReceiveRequestAttemptId()
.hashCode());
return hashCode;
}
代码示例来源:origin: com.amazonaws/aws-java-sdk-sqs
if (other.getMessageAttributeNames() != null && other.getMessageAttributeNames().equals(this.getMessageAttributeNames()) == false)
return false;
if (other.getMaxNumberOfMessages() == null ^ this.getMaxNumberOfMessages() == null)
return false;
if (other.getMaxNumberOfMessages() != null && other.getMaxNumberOfMessages().equals(this.getMaxNumberOfMessages()) == false)
return false;
if (other.getVisibilityTimeout() == null ^ this.getVisibilityTimeout() == null)
代码示例来源:origin: com.amazonaws/aws-android-sdk-sqs
&& other.getMessageAttributeNames().equals(this.getMessageAttributeNames()) == false)
return false;
if (other.getMaxNumberOfMessages() == null ^ this.getMaxNumberOfMessages() == null)
return false;
if (other.getMaxNumberOfMessages() != null
&& other.getMaxNumberOfMessages().equals(this.getMaxNumberOfMessages()) == false)
return false;
if (other.getVisibilityTimeout() == null ^ this.getVisibilityTimeout() == null)
代码示例来源:origin: com.amazonaws/aws-java-sdk-sqs
if (receiveMessageRequest.getMaxNumberOfMessages() != null) {
request.addParameter("MaxNumberOfMessages", StringUtils.fromInteger(receiveMessageRequest.getMaxNumberOfMessages()));
代码示例来源:origin: com.amazonaws/aws-android-sdk-sqs
if (receiveMessageRequest.getMaxNumberOfMessages() != null) {
prefix = "MaxNumberOfMessages";
Integer maxNumberOfMessages = receiveMessageRequest.getMaxNumberOfMessages();
request.addParameter(prefix, StringUtils.fromInteger(maxNumberOfMessages));
内容来源于网络,如有侵权,请联系作者删除!