Class BatchedRequestIssuer<ResponseT> (2.20.0)

Stay organized with collections Save and categorize content based on your preferences.
public final class BatchedRequestIssuer<ResponseT>

BatchedRequestIssuer receives a response or an exception and waits to set the given batchedFuture until sendResult() is called.

This class is designed to be used by generated code.

Inheritance

java.lang.Object > BatchedRequestIssuer<ResponseT>

Type Parameter

NameDescription
ResponseT

Constructors

BatchedRequestIssuer(BatchedFuture<ResponseT> batchedFuture, long messageCount)

public BatchedRequestIssuer(BatchedFuture<ResponseT> batchedFuture, long messageCount)
Parameters
NameDescription
batchedFutureBatchedFuture<ResponseT>
messageCountlong

Methods

getMessageCount()

public long getMessageCount()
Returns
TypeDescription
long

sendResult()

public void sendResult()

Sends back the result that was stored by either setResponse or setException

setException(Throwable throwable)

public void setException(Throwable throwable)

Set the exception to set on the batched future. If this is called, setResponse cannot be called.

Parameter
NameDescription
throwableThrowable

setResponse(ResponseT response)

public void setResponse(ResponseT response)

Set the response to set on the batched future. If this is called, setException cannot be called.

Parameter
NameDescription
responseResponseT