Class RequestBatchManager<RequestT,ResponseT,BatchResponseT>
- java.lang.Object
-
- software.amazon.awssdk.services.sqs.internal.batchmanager.RequestBatchManager<RequestT,ResponseT,BatchResponseT>
-
- Direct Known Subclasses:
ChangeMessageVisibilityBatchManager
,DeleteMessageBatchManager
,SendMessageBatchManager
public abstract class RequestBatchManager<RequestT,ResponseT,BatchResponseT> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected RequestBatchConfiguration
batchConfiguration
static Consumer<AwsRequestOverrideConfiguration.Builder>
USER_AGENT_APPLIER
-
Constructor Summary
Constructors Modifier Constructor Description protected
RequestBatchManager(RequestBatchConfiguration overrideConfiguration, ScheduledExecutorService scheduledExecutor)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract CompletableFuture<BatchResponseT>
batchAndSend(List<IdentifiableMessage<RequestT>> identifiedRequests, String batchKey)
CompletableFuture<ResponseT>
batchRequest(RequestT request)
void
close()
protected abstract String
getBatchKey(RequestT request)
protected abstract List<Either<IdentifiableMessage<ResponseT>,IdentifiableMessage<Throwable>>>
mapBatchResponse(BatchResponseT batchResponse)
-
-
-
Field Detail
-
USER_AGENT_APPLIER
public static final Consumer<AwsRequestOverrideConfiguration.Builder> USER_AGENT_APPLIER
-
batchConfiguration
protected final RequestBatchConfiguration batchConfiguration
-
-
Constructor Detail
-
RequestBatchManager
protected RequestBatchManager(RequestBatchConfiguration overrideConfiguration, ScheduledExecutorService scheduledExecutor)
-
-
Method Detail
-
batchRequest
public CompletableFuture<ResponseT> batchRequest(RequestT request)
-
batchAndSend
protected abstract CompletableFuture<BatchResponseT> batchAndSend(List<IdentifiableMessage<RequestT>> identifiedRequests, String batchKey)
-
mapBatchResponse
protected abstract List<Either<IdentifiableMessage<ResponseT>,IdentifiableMessage<Throwable>>> mapBatchResponse(BatchResponseT batchResponse)
-
close
public void close()
-
-