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

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

Introduction

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

Prototype

public void setLongPoll(boolean longPoll) 

Source Link

Document

Specify "true" for receive requests to use long polling.

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);

    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);

    return config;
}