Class WireTransferableContext
java.lang.Object
org.apache.druid.query.rowsandcols.serde.WireTransferableContext
Object that holds the components and configuration needed for serde of
RowsAndColumns
via WireTransferable.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWireTransferableContext(com.fasterxml.jackson.databind.ObjectMapper smileMapper, WireTransferable.ConcreteDeserializer concreteDeserializer, boolean useLegacyFrameSerialization) -
Method Summary
Modifier and TypeMethodDescriptionReturns the deserializer for RowsAndColumns wire format, or null if not available.deserialize(ByteBuffer theBytes) Deserializes a ByteBuffer into a RowsAndColumns.serializedBytes(WireTransferable wireTransferable) Serializes an object into bytes.com.fasterxml.jackson.databind.ObjectMapperReturns the Smile ObjectMapper for serialization, or null if not available.booleanReturns true if legacy frame serialization formats should be used inRowsAndColumnsSerializerandFrameFileWriter.
-
Field Details
-
DEFAULT_LEGACY_FRAME_SERIALIZATION
public static final boolean DEFAULT_LEGACY_FRAME_SERIALIZATION- See Also:
-
-
Constructor Details
-
WireTransferableContext
public WireTransferableContext(com.fasterxml.jackson.databind.ObjectMapper smileMapper, WireTransferable.ConcreteDeserializer concreteDeserializer, boolean useLegacyFrameSerialization)
-
-
Method Details
-
serializedBytes
public WireTransferable.ByteArrayOffsetAndLen serializedBytes(WireTransferable wireTransferable) throws IOException Serializes an object into bytes.- Returns:
- bytes that represent the wire-format of this object
- Throws:
IOException- a problem with IO
-
deserialize
Deserializes a ByteBuffer into a RowsAndColumns. The deserialized object owns the passed-in buffer as well as the data it points to. It is safe for the deserializer to mutate the buffer, retain a reference to it, etc.- Parameters:
theBytes- ByteBuffer to be deserialized, in little-endian order- Returns:
- RowsAndColumns object deserialized from the ByteBuffer
-
smileMapper
public com.fasterxml.jackson.databind.ObjectMapper smileMapper()Returns the Smile ObjectMapper for serialization, or null if not available. -
concreteDeserializer
Returns the deserializer for RowsAndColumns wire format, or null if not available. -
useLegacyFrameSerialization
public boolean useLegacyFrameSerialization()Returns true if legacy frame serialization formats should be used inRowsAndColumnsSerializerandFrameFileWriter. Returns false if theWireTransferablemechanism should be used.
-