public class PageBuilder extends Object
Constructor and Description |
---|
PageBuilder(int initialExpectedEntries,
List<? extends Type> types) |
PageBuilder(List<? extends Type> types)
Create a PageBuilder with given types.
|
Modifier and Type | Method and Description |
---|---|
Page |
build() |
void |
declarePosition() |
void |
declarePositions(int positions) |
BlockBuilder |
getBlockBuilder(int channel) |
int |
getPositionCount() |
long |
getRetainedSizeInBytes() |
long |
getSizeInBytes() |
Type |
getType(int channel) |
boolean |
isEmpty() |
boolean |
isFull() |
PageBuilder |
newPageBuilderLike() |
void |
reset() |
static PageBuilder |
withMaxPageSize(int maxPageBytes,
List<? extends Type> types) |
public PageBuilder(List<? extends Type> types)
A PageBuilder 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 PageBuilder. Once the PageBuilder is full use reset() or createPageBuilderLike() to create a new PageBuilder instance with its size estimated based on previous data.
public static PageBuilder withMaxPageSize(int maxPageBytes, List<? extends Type> types)
public void reset()
public PageBuilder newPageBuilderLike()
public BlockBuilder getBlockBuilder(int channel)
public Type getType(int channel)
public void declarePosition()
public void declarePositions(int positions)
public boolean isFull()
public boolean isEmpty()
public int getPositionCount()
public long getSizeInBytes()
public long getRetainedSizeInBytes()
public Page build()
Copyright © 2012–2018. All rights reserved.