com.amazonaws.services.sqs.model.ReceiveMessageRequest.getWaitTimeSeconds()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(11.4k)|赞(0)|评价(0)|浏览(65)

本文整理了Java中com.amazonaws.services.sqs.model.ReceiveMessageRequest.getWaitTimeSeconds方法的一些代码示例,展示了ReceiveMessageRequest.getWaitTimeSeconds的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ReceiveMessageRequest.getWaitTimeSeconds方法的具体详情如下:
包路径:com.amazonaws.services.sqs.model.ReceiveMessageRequest
类名称:ReceiveMessageRequest
方法名:getWaitTimeSeconds

ReceiveMessageRequest.getWaitTimeSeconds介绍

[英]The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.
[中]呼叫在返回之前等待消息到达队列的持续时间(秒)。如果有消息,则通话会在[$0$]之前返回。如果没有可用消息且等待时间到期,则呼叫将成功返回,消息列表为空。

代码示例

代码示例来源: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.getVisibilityTimeout() != null && other.getVisibilityTimeout().equals(this.getVisibilityTimeout()) == false)
  return false;
if (other.getWaitTimeSeconds() == null ^ this.getWaitTimeSeconds() == null)
  return false;
if (other.getWaitTimeSeconds() != null && other.getWaitTimeSeconds().equals(this.getWaitTimeSeconds()) == false)
  return false;
if (other.getReceiveRequestAttemptId() == null ^ this.getReceiveRequestAttemptId() == null)

代码示例来源:origin: aws/aws-sdk-java

if (receiveMessageRequest.getWaitTimeSeconds() != null) {
  request.addParameter("WaitTimeSeconds", StringUtils.fromInteger(receiveMessageRequest.getWaitTimeSeconds()));

代码示例来源: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.getVisibilityTimeout().equals(this.getVisibilityTimeout()) == false)
  return false;
if (other.getWaitTimeSeconds() == null ^ this.getWaitTimeSeconds() == null)
  return false;
if (other.getWaitTimeSeconds() != null
    && other.getWaitTimeSeconds().equals(this.getWaitTimeSeconds()) == false)
  return false;
if (other.getReceiveRequestAttemptId() == null ^ this.getReceiveRequestAttemptId() == null)

代码示例来源:origin: aws-amplify/aws-sdk-android

request.addParameter(prefix, StringUtils.fromInteger(visibilityTimeout));
if (receiveMessageRequest.getWaitTimeSeconds() != null) {
  prefix = "WaitTimeSeconds";
  Integer waitTimeSeconds = receiveMessageRequest.getWaitTimeSeconds();
  request.addParameter(prefix, StringUtils.fromInteger(waitTimeSeconds));

代码示例来源: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-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.getVisibilityTimeout() != null && other.getVisibilityTimeout().equals(this.getVisibilityTimeout()) == false)
  return false;
if (other.getWaitTimeSeconds() == null ^ this.getWaitTimeSeconds() == null)
  return false;
if (other.getWaitTimeSeconds() != null && other.getWaitTimeSeconds().equals(this.getWaitTimeSeconds()) == false)
  return false;
if (other.getReceiveRequestAttemptId() == null ^ this.getReceiveRequestAttemptId() == null)

代码示例来源:origin: com.amazonaws/aws-android-sdk-sqs

&& other.getVisibilityTimeout().equals(this.getVisibilityTimeout()) == false)
  return false;
if (other.getWaitTimeSeconds() == null ^ this.getWaitTimeSeconds() == null)
  return false;
if (other.getWaitTimeSeconds() != null
    && other.getWaitTimeSeconds().equals(this.getWaitTimeSeconds()) == false)
  return false;
if (other.getReceiveRequestAttemptId() == null ^ this.getReceiveRequestAttemptId() == null)

代码示例来源:origin: com.amazonaws/aws-java-sdk-sqs

if (receiveMessageRequest.getWaitTimeSeconds() != null) {
  request.addParameter("WaitTimeSeconds", StringUtils.fromInteger(receiveMessageRequest.getWaitTimeSeconds()));

代码示例来源:origin: com.amazonaws/aws-android-sdk-sqs

request.addParameter(prefix, StringUtils.fromInteger(visibilityTimeout));
if (receiveMessageRequest.getWaitTimeSeconds() != null) {
  prefix = "WaitTimeSeconds";
  Integer waitTimeSeconds = receiveMessageRequest.getWaitTimeSeconds();
  request.addParameter(prefix, StringUtils.fromInteger(waitTimeSeconds));

相关文章

微信公众号

最新文章

更多