Class BatchedRequestIssuer<ResponseT> (2.58.0)

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

Name Description
ResponseT

Constructors

BatchedRequestIssuer(BatchedFuture<ResponseT> batchedFuture, long messageCount)

public BatchedRequestIssuer(BatchedFuture<ResponseT> batchedFuture, long messageCount)
Parameters
Name Description
batchedFuture BatchedFuture<ResponseT>
messageCount long

Methods

getMessageCount()

public long getMessageCount()
Returns
Type Description
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
Name Description
throwable Throwable

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
Name Description
response ResponseT