Package com.google.api.gax.rpc
Class BatchedRequestIssuer<ResponseT>
- java.lang.Object
-
- com.google.api.gax.rpc.BatchedRequestIssuer<ResponseT>
-
public final class BatchedRequestIssuer<ResponseT> extends Object
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.
-
-
Constructor Summary
Constructors Constructor Description BatchedRequestIssuer(BatchedFuture<ResponseT> batchedFuture, long messageCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getMessageCount()
void
sendResult()
Sends back the result that was stored by either setResponse or setExceptionvoid
setException(Throwable throwable)
Set the exception to set on the batched future.void
setResponse(ResponseT response)
Set the response to set on the batched future.
-
-
-
Constructor Detail
-
BatchedRequestIssuer
public BatchedRequestIssuer(BatchedFuture<ResponseT> batchedFuture, long messageCount)
-
-
Method Detail
-
getMessageCount
public long getMessageCount()
-
setResponse
public void setResponse(ResponseT response)
Set the response to set on the batched future. If this is called, setException cannot be called.
-
setException
public void setException(Throwable throwable)
Set the exception to set on the batched future. If this is called, setResponse cannot be called.
-
sendResult
public void sendResult()
Sends back the result that was stored by either setResponse or setException
-
-