Class AbstractSerializablePairLongObjectSimpleStagedSerde<T extends SerializablePair<Long,?>>
- java.lang.Object
-
- org.apache.druid.query.aggregation.AbstractSerializablePairLongObjectSimpleStagedSerde<T>
-
- All Implemented Interfaces:
StagedSerde<T>
- Direct Known Subclasses:
SerializablePairLongDoubleSimpleStagedSerde,SerializablePairLongFloatSimpleStagedSerde,SerializablePairLongLongSimpleStagedSerde,SerializablePairLongStringSimpleStagedSerde
public abstract class AbstractSerializablePairLongObjectSimpleStagedSerde<T extends SerializablePair<Long,?>> extends Object implements StagedSerde<T>
serializes a Long/Object pair as Long:Byte:Objector Long:isNullByte:ObjectBytes
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StorableBufferserializeDelayed(T value)Useful method when some computation is necessary to prepare for serialization without actually writing out all the bytes in order to determine the serialized size.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.segment.serde.cell.StagedSerde
deserialize, deserialize, serialize
-
-
-
-
Method Detail
-
serializeDelayed
public StorableBuffer serializeDelayed(@Nullable T value)
Description copied from interface:StagedSerdeUseful method when some computation is necessary to prepare for serialization without actually writing out all the bytes in order to determine the serialized size. It allows encapsulation of the size computation and the final logical to actually store into a ByteBuffer. It also allows for callers to pack multiple serialized objects into a single ByteBuffer without extra copies of a byte[]/ByteBuffer by using theStorableBufferinstance returned- Specified by:
serializeDelayedin interfaceStagedSerde<T extends SerializablePair<Long,?>>- Parameters:
value- - object to serialize- Returns:
- an object that reports its serialized size and how to serialize the object to a ByteBuffer
-
-