public class TupleBuffer extends Object
Modifier and Type | Class and Description |
---|---|
class |
TupleBuffer.TupleBufferTupleSource |
Constructor and Description |
---|
TupleBuffer(BatchManager manager,
String id,
List<? extends Expression> schema,
LobManager lobManager,
int batchSize) |
Modifier and Type | Method and Description |
---|---|
void |
addTuple(List<?> tuple) |
void |
addTupleBatch(TupleBatch batch,
boolean save)
Adds the given batch preserving row offsets.
|
void |
close() |
TupleBuffer.TupleBufferTupleSource |
createIndexedTupleSource() |
TupleBuffer.TupleBufferTupleSource |
createIndexedTupleSource(boolean singleUse)
Create a new iterator for this buffer
|
TupleBatch |
getBatch(long row)
Get the batch containing the given row.
|
int |
getBatchSize() |
String |
getId() |
int |
getLobCount() |
Streamable<?> |
getLobReference(String id) |
long |
getManagedRowCount()
Returns the total number of rows contained in managed batches
|
long |
getRowCount()
Returns the last row number
|
int |
getRowSizeEstimate()
Return a more accurate batch estimate or 0 if a new estimate is not available
|
List<? extends Expression> |
getSchema() |
static String[] |
getTypeNames(List<? extends Expression> expressions)
Gets the data type names for each of the input expressions, in order.
|
String[] |
getTypes() |
boolean |
isFinal() |
boolean |
isForwardOnly() |
boolean |
isLobs() |
boolean |
isRemoved() |
void |
persistLobs() |
void |
purge() |
void |
remove() |
void |
removeLobTracking() |
void |
saveBatch()
Force the persistence of any rows held in memory.
|
void |
setBatchSize(int batchSize) |
void |
setFinal(boolean isFinal) |
void |
setForwardOnly(boolean forwardOnly) |
void |
setId(String uuid) |
void |
setInlineLobs(boolean inline) |
void |
setPrefersMemory(boolean prefersMemory) |
void |
setRowCount(long rowCount) |
String |
toString() |
void |
truncateTo(int rowLimit) |
public TupleBuffer(BatchManager manager, String id, List<? extends Expression> schema, LobManager lobManager, int batchSize)
public static String[] getTypeNames(List<? extends Expression> expressions)
expressions
- List of Expressionspublic void setInlineLobs(boolean inline)
public void removeLobTracking()
public String getId()
public void setId(String uuid)
public boolean isLobs()
public void addTuple(List<?> tuple) throws TeiidComponentException
TeiidComponentException
public void addTupleBatch(TupleBatch batch, boolean save) throws TeiidComponentException
batch
- TeiidComponentException
public void setRowCount(long rowCount) throws TeiidComponentException
TeiidComponentException
public void purge()
public void persistLobs() throws TeiidComponentException
TeiidComponentException
public void saveBatch() throws TeiidComponentException
TeiidComponentException
public void close() throws TeiidComponentException
TeiidComponentException
public TupleBatch getBatch(long row) throws TeiidComponentException
row
- TeiidComponentException
- TODO: a method to get the raw batchpublic void remove()
public long getManagedRowCount()
public long getRowCount()
public boolean isFinal()
public void setFinal(boolean isFinal)
public List<? extends Expression> getSchema()
public int getBatchSize()
public void setBatchSize(int batchSize)
public Streamable<?> getLobReference(String id) throws TeiidComponentException
TeiidComponentException
public void setForwardOnly(boolean forwardOnly)
public TupleBuffer.TupleBufferTupleSource createIndexedTupleSource()
public TupleBuffer.TupleBufferTupleSource createIndexedTupleSource(boolean singleUse)
public boolean isRemoved()
public boolean isForwardOnly()
public void setPrefersMemory(boolean prefersMemory)
public String[] getTypes()
public int getLobCount()
public void truncateTo(int rowLimit) throws TeiidComponentException
TeiidComponentException
public int getRowSizeEstimate()
Copyright © 2020. All rights reserved.