Class MultiKeyResponseWrapper<K>
java.lang.Object
com.linkedin.venice.listener.response.AbstractReadResponse
com.linkedin.venice.listener.response.MultiKeyResponseWrapper<K>
- All Implemented Interfaces:
ReadResponse
- Direct Known Subclasses:
ComputeResponseWrapper
,MultiGetResponseWrapper
-
Method Summary
Methods inherited from class com.linkedin.venice.listener.response.AbstractReadResponse
getCompressionStrategy, getRCU, isFound, isStreamingResponse, setCompressionStrategy, setRCU, setStreamingResponse
-
Method Details
-
addRecord
- Parameters:
record
- to be added into the container.- Throws:
IllegalStateException
- if called aftergetResponseBody()
-
getResponseSchemaIdHeader
public abstract int getResponseSchemaIdHeader()- Specified by:
getResponseSchemaIdHeader
in interfaceReadResponse
- Specified by:
getResponseSchemaIdHeader
in classAbstractReadResponse
-
getStats
-
getStatsRecorder
- Specified by:
getStatsRecorder
in classAbstractReadResponse
-
getResponseBody
public io.netty.buffer.ByteBuf getResponseBody()N.B.: This function is backed by aLazy
property. The first time it is called, the response is recorded and will therefore not be regenerated even if the more records are added. To make this behavior unambiguous, it is no longer possible to add records after calling this function, as therecords
property then becomes an empty list.- Specified by:
getResponseBody
in interfaceReadResponse
- Specified by:
getResponseBody
in classAbstractReadResponse
- Returns:
- the serialized response as a
ByteBuf
-
toString
-