public class CompressedLongsSerializer extends Object implements Serializer
| Constructor and Description |
|---|
CompressedLongsSerializer(SegmentWriteOutMedium segmentWriteOutMedium,
CompressionStrategy compression) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long value) |
long |
getSerializedSize()
Returns the number of bytes, that this Serializer will write to the output _channel_ (not smoosher) on a
Serializer.writeTo(java.nio.channels.WritableByteChannel, org.apache.druid.java.util.common.io.smoosh.FileSmoosher) call. |
void |
open() |
void |
writeTo(WritableByteChannel channel,
FileSmoosher smoosher)
Writes serialized form of this object to the given channel.
|
public CompressedLongsSerializer(SegmentWriteOutMedium segmentWriteOutMedium, CompressionStrategy compression)
public void open()
throws IOException
IOExceptionpublic void add(long value)
throws IOException
IOExceptionpublic long getSerializedSize()
throws IOException
SerializerSerializer.writeTo(java.nio.channels.WritableByteChannel, org.apache.druid.java.util.common.io.smoosh.FileSmoosher) call.getSerializedSize in interface SerializerIOExceptionpublic void writeTo(WritableByteChannel channel, FileSmoosher smoosher) throws IOException
SerializerwriteTo in interface SerializerIOExceptionCopyright © 2011–2023 The Apache Software Foundation. All rights reserved.