Class BatchingMap<RequestT,ResponseT>
- java.lang.Object
-
- software.amazon.awssdk.services.sqs.internal.batchmanager.BatchingMap<RequestT,ResponseT>
-
- Type Parameters:
RequestT- the type of an outgoing response
@SdkInternalApi public final class BatchingMap<RequestT,ResponseT> extends Object
Outer map maps a batchKey (ex. queueUrl, overrideConfig etc.) to aRequestBatchBuffer
-
-
Constructor Summary
Constructors Constructor Description BatchingMap(RequestBatchConfiguration overrideConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelAndReplaceScheduledFlush(String batchKey, ScheduledFuture<?> scheduledFlush)voidcancelScheduledFlush(String batchKey)voidclear()booleancontains(String batchKey)Map<String,BatchingExecutionContext<RequestT,ResponseT>>extractBatchIfReady(String batchKey)Map<String,BatchingExecutionContext<RequestT,ResponseT>>extractBatchIfSizeExceeded(String batchKey, RequestT request)Map<String,BatchingExecutionContext<RequestT,ResponseT>>extractEntriesForScheduledFlush(String batchKey, int maxBatchItems)voidforEach(BiConsumer<String,RequestBatchBuffer<RequestT,ResponseT>> action)voidput(String batchKey, Supplier<ScheduledFuture<?>> scheduleFlush, RequestT request, CompletableFuture<ResponseT> response)
-
-
-
Constructor Detail
-
BatchingMap
public BatchingMap(RequestBatchConfiguration overrideConfiguration)
-
-
Method Detail
-
put
public void put(String batchKey, Supplier<ScheduledFuture<?>> scheduleFlush, RequestT request, CompletableFuture<ResponseT> response) throws IllegalStateException
- Throws:
IllegalStateException
-
contains
public boolean contains(String batchKey)
-
cancelAndReplaceScheduledFlush
public void cancelAndReplaceScheduledFlush(String batchKey, ScheduledFuture<?> scheduledFlush)
-
forEach
public void forEach(BiConsumer<String,RequestBatchBuffer<RequestT,ResponseT>> action)
-
extractBatchIfReady
public Map<String,BatchingExecutionContext<RequestT,ResponseT>> extractBatchIfReady(String batchKey)
-
extractBatchIfSizeExceeded
public Map<String,BatchingExecutionContext<RequestT,ResponseT>> extractBatchIfSizeExceeded(String batchKey, RequestT request)
-
extractEntriesForScheduledFlush
public Map<String,BatchingExecutionContext<RequestT,ResponseT>> extractEntriesForScheduledFlush(String batchKey, int maxBatchItems)
-
cancelScheduledFlush
public void cancelScheduledFlush(String batchKey)
-
clear
public void clear()
-
-