Class BinaryReaderToTableWriter
java.lang.Object
com.illumon.iris.db.tables.dataimport.logtailer.BinaryReaderToTableWriter
- All Implemented Interfaces:
TableListener
public class BinaryReaderToTableWriter extends Object implements TableListener
-
Constructor Summary
Constructors Constructor Description BinaryReaderToTableWriter()
-
Method Summary
Modifier and Type Method Description void
close()
Close this listener when no further rows will be supplied.TableDefinition
getTableDefinition()
Get theTableDefinition
that specifies the columns this table listener expects to supply to its writer.void
init(TableReader reader)
Specify the reader to be used for subsequent rows.void
onNewRow()
Called by the driving application whenever a new row that is available from the reader.ImportState
resumeReading(ImportState importState)
Allow the driving application to supply a listener with its import state object.void
setWriter(TableWriter writer)
Supply the writer for output.void
setWriter(TableWriter writer, DbTableLocation unused)
Supply the writer for output.
-
Constructor Details
-
BinaryReaderToTableWriter
public BinaryReaderToTableWriter()
-
-
Method Details
-
init
Description copied from interface:TableListener
Specify the reader to be used for subsequent rows. Typically allows listeners to obtain RowGetters for each relevant column.- Specified by:
init
in interfaceTableListener
- Parameters:
reader
- The reader
-
onNewRow
public void onNewRow()Description copied from interface:TableListener
Called by the driving application whenever a new row that is available from the reader.- Specified by:
onNewRow
in interfaceTableListener
-
setWriter
Description copied from interface:TableListener
Supply the writer for output. Typically allows listeners to obtain RowSetters for each relevant column.- Specified by:
setWriter
in interfaceTableListener
- Parameters:
writer
- The writerunused
- The table location object, typically used only for import details output on close
-
setWriter
Description copied from interface:TableListener
Supply the writer for output. Typically allows listeners to obtain RowSetters for each relevant column.- Specified by:
setWriter
in interfaceTableListener
- Parameters:
writer
- The writer
-
close
Description copied from interface:TableListener
Close this listener when no further rows will be supplied.- Specified by:
close
in interfaceTableListener
- Throws:
IOException
-
resumeReading
Description copied from interface:TableListener
Allow the driving application to supply a listener with its import state object.- Specified by:
resumeReading
in interfaceTableListener
- Parameters:
importState
- The import state object, or null if none exists
-
getTableDefinition
Description copied from interface:TableListener
Get theTableDefinition
that specifies the columns this table listener expects to supply to its writer.Note that this should only include writable columns, and that listener implementations are only required to accurately describe the column names (
DefaultColumnDefinition.getName()
) and data types (ColumnDefinition.getDataType()
) they expect to supply.- Specified by:
getTableDefinition
in interfaceTableListener
- Returns:
- The supported
TableDefinition
.
-