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 and Description |
---|---|
void |
clear()
Clears and nacks any pre-fetched messages in this buffer.
|
com.amazonaws.services.sqs.buffered.QueueBufferFuture<ReceiveMessageRequest,ReceiveMessageResult> |
receiveMessageAsync(ReceiveMessageRequest rq,
com.amazonaws.services.sqs.buffered.QueueBufferCallback<ReceiveMessageRequest,ReceiveMessageResult> 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 com.amazonaws.services.sqs.buffered.QueueBufferFuture<ReceiveMessageRequest,ReceiveMessageResult> receiveMessageAsync(ReceiveMessageRequest rq, com.amazonaws.services.sqs.buffered.QueueBufferCallback<ReceiveMessageRequest,ReceiveMessageResult> callback)
public void clear()
Copyright © 2015. All rights reserved.