public class EncodedStringDictionaryWriter extends Object implements DictionaryWriter<String>
| Modifier and Type | Field and Description |
|---|---|
static byte |
VERSION |
| Constructor and Description |
|---|
EncodedStringDictionaryWriter(DictionaryWriter<byte[]> delegate,
StringEncodingStrategy encodingStrategy) |
| Modifier and Type | Method and Description |
|---|---|
String |
get(int dictId) |
int |
getCardinality() |
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. |
boolean |
isSorted() |
void |
open() |
void |
write(String objectToWrite) |
void |
writeTo(WritableByteChannel channel,
FileSmoosher smoosher)
Writes serialized form of this object to the given channel.
|
public static final byte VERSION
public EncodedStringDictionaryWriter(DictionaryWriter<byte[]> delegate, StringEncodingStrategy encodingStrategy)
public boolean isSorted()
isSorted in interface DictionaryWriter<String>public void open()
throws IOException
open in interface DictionaryWriter<String>IOExceptionpublic void write(@Nullable String objectToWrite) throws IOException
write in interface DictionaryWriter<String>IOException@Nullable public String get(int dictId) throws IOException
get in interface DictionaryWriter<String>IOExceptionpublic int getCardinality()
getCardinality in interface DictionaryWriter<String>public 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.