Class GrpcRequestContext
java.lang.Object
com.linkedin.venice.listener.grpc.GrpcRequestContext
We need to keep track of each request as it goes through the pipeline so that we can record the necessary metrics
and separate different parts of the logic for the response. If a specific handler raises an error, we set
the hasError flag to true and stop executing the rest of the pipeline excluding the stats collection.
-
Constructor Summary
ConstructorDescriptionGrpcRequestContext
(VeniceClientRequest veniceClientRequest, VeniceServerResponse.Builder veniceServerResponseBuilder, io.grpc.stub.StreamObserver<VeniceServerResponse> responseObserver) -
Method Summary
Modifier and TypeMethodDescriptionio.grpc.stub.StreamObserver<VeniceServerResponse>
boolean
hasError()
boolean
void
void
setError()
void
setGrpcStatsContext
(ServerStatsContext serverStatsContext) void
setReadResponse
(ReadResponse readResponse) void
setResponseObserver
(io.grpc.stub.StreamObserver<VeniceServerResponse> responseObserver) void
setRouterRequest
(RouterRequest routerRequest) void
setVeniceClientRequest
(VeniceClientRequest veniceClientRequest) void
setVeniceServerResponseBuilder
(VeniceServerResponse.Builder veniceServerResponseBuilder)
-
Constructor Details
-
GrpcRequestContext
public GrpcRequestContext(VeniceClientRequest veniceClientRequest, VeniceServerResponse.Builder veniceServerResponseBuilder, io.grpc.stub.StreamObserver<VeniceServerResponse> responseObserver)
-
-
Method Details
-
setGrpcStatsContext
-
getGrpcStatsContext
-
getVeniceClientRequest
-
setVeniceClientRequest
-
getVeniceServerResponseBuilder
-
setVeniceServerResponseBuilder
public void setVeniceServerResponseBuilder(VeniceServerResponse.Builder veniceServerResponseBuilder) -
getResponseObserver
-
setResponseObserver
-
getRouterRequest
-
setRouterRequest
-
getReadResponse
-
setReadResponse
-
setCompleted
public void setCompleted() -
isCompleted
public boolean isCompleted() -
hasError
public boolean hasError() -
setError
public void setError()
-