public class ReceiveQueueBuffer extends Object
Synchronization strategy: - Threads must hold the TaskSpawnSyncPoint object monitor to spawn a new task or modify the number of inflight tasks - Threads must hold the monitor of the "futures" list to modify the list - Threads must hold the monitor of the "finishedTasks" list to modify the list - If you need to lock both futures and finishedTasks, lock futures first and finishedTasks second
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
Clears and nacks any pre-fetched messages in this buffer.
|
software.amazon.awssdk.services.sqs.buffered.QueueBufferFuture<ReceiveMessageRequest,ReceiveMessageResponse> |
receiveMessageAsync(ReceiveMessageRequest rq,
software.amazon.awssdk.services.sqs.buffered.QueueBufferCallback<ReceiveMessageRequest,ReceiveMessageResponse> callback) |
Submits the request for retrieval of messages from the queue and returns a future that will
be signalled when the request is satisfied.
|
void |
shutdown() |
Prevents spawning of new retrieval batches and waits for all in-flight retrieval batches to
finish
|
public void shutdown()
public software.amazon.awssdk.services.sqs.buffered.QueueBufferFuture<ReceiveMessageRequest,ReceiveMessageResponse> receiveMessageAsync(ReceiveMessageRequest rq, software.amazon.awssdk.services.sqs.buffered.QueueBufferCallback<ReceiveMessageRequest,ReceiveMessageResponse> callback)
public void clear()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.