public class GenericIndexedWriter<T> extends Object implements Serializer
GenericIndexed| Constructor and Description | 
|---|
GenericIndexedWriter(SegmentWriteOutMedium segmentWriteOutMedium,
                    String filenameBase,
                    ObjectStrategy<T> strategy)  | 
GenericIndexedWriter(SegmentWriteOutMedium segmentWriteOutMedium,
                    String filenameBase,
                    ObjectStrategy<T> strategy,
                    int fileSizeLimit)  | 
| Modifier and Type | Method and Description | 
|---|---|
static String | 
generateHeaderFileName(String fileNameBase)  | 
static String | 
generateValueFileName(String fileNameBase,
                     int fileNum)  | 
T | 
get(int index)  | 
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, io.druid.java.util.common.io.smoosh.FileSmoosher) call. | 
void | 
open()  | 
void | 
setObjectsNotSorted()  | 
void | 
write(T objectToWrite)  | 
void | 
writeTo(WritableByteChannel channel,
       FileSmoosher smoosher)
Writes serialized form of this object to the given channel. 
 | 
public GenericIndexedWriter(SegmentWriteOutMedium segmentWriteOutMedium, String filenameBase, ObjectStrategy<T> strategy)
public GenericIndexedWriter(SegmentWriteOutMedium segmentWriteOutMedium, String filenameBase, ObjectStrategy<T> strategy, int fileSizeLimit)
public void open()
          throws IOException
IOExceptionpublic void setObjectsNotSorted()
public void write(T objectToWrite) throws IOException
IOException@Nullable public T get(int index) throws IOException
IOExceptionpublic long getSerializedSize()
                       throws IOException
SerializerSerializer.writeTo(java.nio.channels.WritableByteChannel, io.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–2018. All rights reserved.