Class StreamTableWriter
java.lang.Object
com.illumon.iris.db.tables.dataimport.StreamTableWriter
- All Implemented Interfaces:
Entry,Record,Row,TableWriter
A "stream" table writer that outputs to a single byte buffer sink.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.binarystore.Record
Record.RecordSetter<T extends RecordData> -
Field Summary
Fields inherited from interface com.illumon.iris.binarystore.TableWriter
NULL_SETTER -
Constructor Summary
ConstructorsConstructorDescriptionStreamTableWriter(TableDefinition definition, com.fishlib.io.streams.CurrentByteBufferSink byteBufferSink) Create a stream table writer that writes to the supplied sink. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the writer.voidflush()Flushes data out.String[]Gets the column names for the table.Class[]Gets the column types for the table.Get a writer for a Row entries.Gets a setter for a column.voidbooleanTrue if all data types can be written out; false otherwise.voidwriteRow()Writes out a new row (values set using setters).voidwriteTable(Table t, long offset, long length) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.binarystore.Row
getColumnPartitionValue, setColumnPartitionValueMethods inherited from interface com.illumon.iris.binarystore.TableWriter
flushDeferredRows, getRecordSetter, getRecordSetter, getRecordWriter, getSetter, writeDeferredRow, writeRecord
-
Constructor Details
-
StreamTableWriter
public StreamTableWriter(@NotNull TableDefinition definition, @NotNull com.fishlib.io.streams.CurrentByteBufferSink byteBufferSink) Create a stream table writer that writes to the supplied sink.- Parameters:
definition- The table definitionbyteBufferSink- The sink
-
-
Method Details
-
getSetter
Description copied from interface:TableWriterGets a setter for a column.The implementation is likely to delegate to
Row.getSetter(String)in a default Row instance.- Specified by:
getSetterin interfaceRow- Specified by:
getSetterin interfaceTableWriter- Parameters:
name- column name- Returns:
- setter for the column.
-
setFlags
Description copied from interface:TableWriterThe implementation is likely to delegate to
Row.setFlags(Flags)in a default Row instance.- Specified by:
setFlagsin interfaceRow- Specified by:
setFlagsin interfaceTableWriter
-
getRowWriter
Description copied from interface:TableWriterGet a writer for a Row entries. This is likely to be newly created, so callers should cache this value. In practice, TableWriter implementations generally cache the result of the first call to this method as a primary writer.- Specified by:
getRowWriterin interfaceTableWriter- Returns:
- a Row, likely newly created
-
writeRow
Description copied from interface:TableWriterWrites out a new row (values set using setters).The implementation is likely to delegate to
Row.writeRow()in a default Row instance.- Specified by:
writeRowin interfaceRow- Specified by:
writeRowin interfaceTableWriter- Throws:
IOException- problem writing the row
-
flush
public void flush()Description copied from interface:TableWriterFlushes data out.- Specified by:
flushin interfaceTableWriter
-
supportAllTypes
public boolean supportAllTypes()Description copied from interface:TableWriterTrue if all data types can be written out; false otherwise.- Specified by:
supportAllTypesin interfaceTableWriter- Returns:
- true if all data types can be written out; false otherwise.
-
close
Description copied from interface:TableWriterCloses the writer.- Specified by:
closein interfaceTableWriter- Throws:
IOException- problem closing the writer.
-
getColumnTypes
Description copied from interface:TableWriterGets the column types for the table.- Specified by:
getColumnTypesin interfaceTableWriter- Returns:
- column types for the table.
-
getColumnNames
Description copied from interface:TableWriterGets the column names for the table.- Specified by:
getColumnNamesin interfaceTableWriter- Returns:
- column names for the table.
-
writeTable
- Throws:
IOException
-