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
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>>flushableRequests(String batchKey)Map<String,BatchingExecutionContext<RequestT,ResponseT>>flushableRequestsOnByteLimitBeforeAdd(String batchKey, RequestT request)Map<String,BatchingExecutionContext<RequestT,ResponseT>>flushableScheduledRequests(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)
-
flushableRequests
public Map<String,BatchingExecutionContext<RequestT,ResponseT>> flushableRequests(String batchKey)
-
flushableRequestsOnByteLimitBeforeAdd
public Map<String,BatchingExecutionContext<RequestT,ResponseT>> flushableRequestsOnByteLimitBeforeAdd(String batchKey, RequestT request)
-
flushableScheduledRequests
public Map<String,BatchingExecutionContext<RequestT,ResponseT>> flushableScheduledRequests(String batchKey, int maxBatchItems)
-
cancelScheduledFlush
public void cancelScheduledFlush(String batchKey)
-
clear
public void clear()
-
-