private class ReceiveQueueBuffer.ReceiveMessageBatchTask
extends java.lang.Object
implements java.lang.Runnable
The batch task is constructed !open
until the ReceiveMessage
completes. At
that point, the batch opens and its messages (if any) become available to read.
Modifier and Type | Field and Description |
---|---|
private java.lang.Exception |
exception |
private java.util.List<Message> |
messages |
private boolean |
open |
private ReceiveQueueBuffer |
parentBuffer |
private long |
visibilityDeadlineNano |
Constructor and Description |
---|
ReceiveMessageBatchTask(ReceiveQueueBuffer paramParentBuffer)
Constructs a receive task waiting the specified time before calling SQS.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
clear()
Nacks and clears all messages remaining in the batch.
|
(package private) java.lang.Exception |
getException() |
(package private) boolean |
isEmpty() |
(package private) boolean |
isExpired() |
(package private) Message |
removeMessage()
Returns a message if one is available.
|
void |
run()
Attempts to retrieve messages from SQS and upon completion (successful or unsuccessful)
reports the batch as complete and open
|
private java.lang.Exception exception
private java.util.List<Message> messages
private long visibilityDeadlineNano
private boolean open
private ReceiveQueueBuffer parentBuffer
ReceiveMessageBatchTask(ReceiveQueueBuffer paramParentBuffer)
waitTimeMs
- the time to wait before calling SQSboolean isEmpty()
java.lang.Exception getException()
Message removeMessage()
The call adjusts the message count.
null
if none is availableboolean isExpired()
void clear()
public void run()
run
in interface java.lang.Runnable