Class TsBlockBuilder


  • public class TsBlockBuilder
    extends java.lang.Object
    • Constructor Detail

      • TsBlockBuilder

        public TsBlockBuilder​(java.util.List<TSDataType> types)
        Create a TsBlockBuilder with given types.

        A TsBlockBuilder instance created with this constructor has no estimation about bytes per entry, therefore it can resize frequently while appending new rows.

        This constructor should only be used to get the initial TsBlockBuilder. Once the TsBlockBuilder is full use reset() or createTsBlockBuilderLike() to create a new TsBlockBuilder instance with its size estimated based on previous data.

      • TsBlockBuilder

        public TsBlockBuilder​(int initialExpectedEntries,
                              java.util.List<TSDataType> types)
    • Method Detail

      • createWithOnlyTimeColumn

        public static TsBlockBuilder createWithOnlyTimeColumn()
      • withMaxTsBlockSize

        public static TsBlockBuilder withMaxTsBlockSize​(int maxTsBlockBytes,
                                                        java.util.List<TSDataType> types)
      • buildValueColumnBuilders

        public void buildValueColumnBuilders​(java.util.List<TSDataType> types)
      • reset

        public void reset()
      • newTsBlockBuilderLike

        public TsBlockBuilder newTsBlockBuilderLike()
      • getColumnBuilder

        public ColumnBuilder getColumnBuilder​(int channel)
      • getValueColumnBuilders

        public ColumnBuilder[] getValueColumnBuilders()
      • getType

        public TSDataType getType​(int channel)
      • declarePosition

        public void declarePosition()
      • declarePositions

        public void declarePositions​(int deltaPositions)
      • isFull

        public boolean isFull()
      • isEmpty

        public boolean isEmpty()
      • getPositionCount

        public int getPositionCount()
      • getSizeInBytes

        public long getSizeInBytes()
      • getRetainedSizeInBytes

        public long getRetainedSizeInBytes()
      • writeNullableText

        public void writeNullableText​(int columnIndex,
                                      java.lang.String value)
        Write a text value to the columnIndex. If the value is null, then the place will be recorded with null.
        Parameters:
        columnIndex - the target column index.
        value - the text value to be inserted.