Class BatchingMap<RequestT,ResponseT,KeyT>
java.lang.Object
software.amazon.awssdk.services.sqs.internal.batchmanager.BatchingMap<RequestT,ResponseT,KeyT>
- Type Parameters:
RequestT- the type of an outgoing requestResponseT- the type of the response to each requestKeyT- the type of the batch key
Outer map maps a batchKey (ex. queueUrl, overrideConfig etc.) to a
RequestBatchBuffer-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelAndReplaceScheduledFlush(KeyT batchKey, Supplier<ScheduledFuture<?>> scheduleFlush) voidcancelScheduledFlush(KeyT batchKey) voidclear()booleanvoidevictIfEmpty(KeyT batchKey) Removes the buffer for the given key and cancels its scheduled flush if the buffer holds no requests.extractBatchIfReady(KeyT batchKey) extractBatchIfSizeExceeded(KeyT batchKey, RequestT request) extractEntriesForScheduledFlush(KeyT batchKey, int maxBatchItems) voidforEach(BiConsumer<KeyT, RequestBatchBuffer<RequestT, ResponseT>> action) voidput(KeyT batchKey, Supplier<ScheduledFuture<?>> scheduleFlush, RequestT request, CompletableFuture<ResponseT> response)
-
Constructor Details
-
BatchingMap
-
-
Method Details
-
put
public void put(KeyT batchKey, Supplier<ScheduledFuture<?>> scheduleFlush, RequestT request, CompletableFuture<ResponseT> response) throws IllegalStateException - Throws:
IllegalStateException
-
evictIfEmpty
Removes the buffer for the given key and cancels its scheduled flush if the buffer holds no requests. -
contains
-
cancelAndReplaceScheduledFlush
public void cancelAndReplaceScheduledFlush(KeyT batchKey, Supplier<ScheduledFuture<?>> scheduleFlush) -
forEach
-
extractBatchIfReady
-
extractBatchIfSizeExceeded
-
extractEntriesForScheduledFlush
-
cancelScheduledFlush
-
clear
public void clear()
-