Example usage for com.amazonaws.services.sqs.buffered QueueBufferConfig setLongPollWaitTimeoutSeconds

List of usage examples for com.amazonaws.services.sqs.buffered QueueBufferConfig setLongPollWaitTimeoutSeconds

Introduction

In this page you can find the example usage for com.amazonaws.services.sqs.buffered QueueBufferConfig setLongPollWaitTimeoutSeconds.

Prototype

public void setLongPollWaitTimeoutSeconds(int longPollWaitTimeoutSeconds) 

Source Link

Document

Specifies the amount of time, in seconds, the receive call will block on the server waiting for messages to arrive if the queue is empty when the receive call is first made.

Usage

From source file:io.relution.jenkins.awssqs.factories.SQSFactoryImpl.java

License:Apache License

private QueueBufferConfig getQueueBufferConfig(final io.relution.jenkins.awssqs.interfaces.SQSQueue queue) {
    final QueueBufferConfig config = new QueueBufferConfig();

    // TODO Add more options

    config.setLongPollWaitTimeoutSeconds(queue.getWaitTimeSeconds());
    config.setLongPoll(true);/*from  w w w.j  a  va  2 s. com*/

    return config;
}

From source file:io.relution.jenkins.scmsqs.factories.SQSFactoryImpl.java

License:Apache License

private QueueBufferConfig getQueueBufferConfig(final SQSQueue queue) {
    final QueueBufferConfig config = new QueueBufferConfig();

    // TODO Add more options

    config.setLongPollWaitTimeoutSeconds(queue.getWaitTimeSeconds());
    config.setLongPoll(true);/*from w  w w  .java  2s.c o m*/

    return config;
}