Interface TableLogger
- All Superinterfaces:
- com.illumon.intradaylogger.IntradayLogger,- TableLoggerBase
- All Known Implementing Classes:
- ProcessTelemetryFormat1Logger
public interface TableLogger extends TableLoggerBase, com.illumon.intradaylogger.IntradayLogger
An interface that logs snapshots and optionally, updates from a source table to another Deephaven table.
 Implementations of this interface must provide implementations of the TableLoggerBase.Handle interface
 with the logger context as well as the logTableHandle and logTableHandlePrev methods to log the current and
 previous values of a particular row index, respectively.
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static classTableLogger.NoPrevColumnSource<T>A ColumnSource that always returns null-equivalent for previous values.Nested classes/interfaces inherited from interface com.illumon.intradaylogger.IntradayLoggercom.illumon.intradaylogger.IntradayLogger.TableWriterFactory, com.illumon.intradaylogger.IntradayLogger.TableWriterFactoryImplNested classes/interfaces inherited from interface com.illumon.iris.db.tables.dataimport.TableLoggerBaseTableLoggerBase.Flags, TableLoggerBase.Handle, TableLoggerBase.Operation
- 
Field SummaryFields inherited from interface com.illumon.intradaylogger.IntradayLoggerDEFAULT_INTRADAY_LOGGER_FLAGSFields inherited from interface com.illumon.iris.db.tables.dataimport.TableLoggerBaseDEFAULT_TABLELOGGER_FLAGS
- 
Method SummaryModifier and Type Method Description default TableWritergetWriter()Return the table writer.default voidlogTable(Table tableToLog, Index index, TableLoggerBase.Flags flags, boolean logUpdates, boolean logPrevValues)Writes a subset of tableToLog to the binary log.default voidlogTable(Table tableToLog, Index index, TableLoggerBase.Flags flags, boolean logUpdates, boolean logPrevValues, Collection<String> prevColumnsToLog)Writes a subset of tableToLog to the binary log.voidlogTableHandle(TableLoggerBase.Handle logHandle, Row.Flags flags, long index, TableLoggerBase.Operation operation)Log a row from a table handlevoidlogTableHandlePrev(TableLoggerBase.Handle logHandle, Row.Flags flags, long index, TableLoggerBase.Operation operation)Log a previous row from a table handlestatic <T> ColumnSourcemaybeWrapWithNoPrevSource(Collection<String> prevColumnsToLog, String columnName, ColumnSource<T> columnSource)Helper function to wrap a column source with a NoPrevColumnSource if previous values are not desired by the logger.Methods inherited from interface com.illumon.intradaylogger.IntradayLoggerclose, getLogFormat, getWriterThread, init, init, init, init, isClosed, setOverflowThrottle, shutdown, tryWrite, usingDynamicPartitioning, waitDone, waitDoneMethods inherited from interface com.illumon.iris.db.tables.dataimport.TableLoggerBasegetLogHandle, logTable, logTable, logTable, logTable, logTable, logTable, logTable
- 
Method Details- 
logTableHandlevoid logTableHandle(TableLoggerBase.Handle logHandle, Row.Flags flags, long index, TableLoggerBase.Operation operation) throws IOExceptionLog a row from a table handle- Parameters:
- logHandle- the log handle to extract data from
- flags- controls the transaction behavior
- index- the row (index key) to log
- operation- the table update event that resulted in this log call
- Throws:
- IOException- if the log call fails
 
- 
logTableHandlePrevvoid logTableHandlePrev(TableLoggerBase.Handle logHandle, Row.Flags flags, long index, TableLoggerBase.Operation operation) throws IOExceptionLog a previous row from a table handle- Parameters:
- logHandle- the log handle to extract data from
- flags- controls the transaction behavior
- index- the row (index key) to log
- operation- the table update event that resulted in this log call
- Throws:
- IOException- if the log call fails
 
- 
logTabledefault void logTable(Table tableToLog, Index index, TableLoggerBase.Flags flags, boolean logUpdates, boolean logPrevValues) throws IOExceptionWrites a subset of tableToLog to the binary log.- Specified by:
- logTablein interface- TableLoggerBase
- Parameters:
- tableToLog- the table to log, must conform to the definition used to create this logger
- index- the subset of the table to log
- flags- controls the transaction behavior
- logUpdates- if true, continue to log updates to the table
- logPrevValues- if true, log the old version of each row when rows are modified (only applicable when logUpdates is true)
- Throws:
- IOException- if an error occurs while logging
 
- 
logTabledefault void logTable(Table tableToLog, Index index, TableLoggerBase.Flags flags, boolean logUpdates, boolean logPrevValues, Collection<String> prevColumnsToLog) throws IOExceptionWrites a subset of tableToLog to the binary log.- Specified by:
- logTablein interface- TableLoggerBase
- Parameters:
- tableToLog- the table to log, must conform to the definition used to create this logger
- index- the subset of the table to log
- flags- controls the transaction behavior
- logUpdates- if true, continue to log updates to the table
- prevColumnsToLog- if true, log the old version of each row when rows are modified (only applicable when logUpdates is true)
- logPrevValues- if true, log the old version of each row when rows are modified (only applicable when logUpdates is true)
- Throws:
- IOException- if an error occurs while logging
 
- 
getWriterReturn the table writer. This will have been created by the created by the TableWriterFactory during init().- Returns:
- the internal TableWriter, or null if the implementation does not support this call.
 
- 
maybeWrapWithNoPrevSourcestatic <T> ColumnSource maybeWrapWithNoPrevSource(Collection<String> prevColumnsToLog, String columnName, ColumnSource<T> columnSource)Helper function to wrap a column source with a NoPrevColumnSource if previous values are not desired by the logger.- Type Parameters:
- T- the column type
- Parameters:
- prevColumnsToLog- collection of columns for which to log previous values (null for all)
- columnName- name of the relevant column
- columnSource- ColumnSource corresponding to the given column name
- Returns:
- either the original column source or a NoPrevColumnSource
 
 
-