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 void
cancelScheduledFlush(String batchKey)
void
clear()
boolean
contains(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)
void
forEach(BiConsumer<String,RequestBatchBuffer<RequestT,ResponseT>> action)
void
put(String batchKey, Supplier<ScheduledFuture<?>> scheduleFlush, RequestT request, CompletableFuture<ResponseT> response)
void
putScheduledFlush(String batchKey, ScheduledFuture<?> scheduledFlush)
-
-
-
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)
-
putScheduledFlush
public void putScheduledFlush(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()
-
-