public interface TableLogger extends TableLoggerBase, com.illumon.intradaylogger.IntradayLogger
Modifier and Type | Interface and Description |
---|---|
static class |
TableLogger.NoPrevColumnSource<T>
A ColumnSource that always returns null-equivalent for previous values.
|
TableLoggerBase.Flags, TableLoggerBase.Handle, TableLoggerBase.Operation
DEFAULT_TABLELOGGER_FLAGS
Modifier and Type | Method and Description |
---|---|
default TableWriter |
getWriter()
Return the table writer.
|
default void |
logTable(Table tableToLog,
Index index,
TableLoggerBase.Flags flags,
boolean logUpdates,
boolean logPrevValues)
Writes a subset of tableToLog to the binary log.
|
default void |
logTable(Table tableToLog,
Index index,
TableLoggerBase.Flags flags,
boolean logUpdates,
boolean logPrevValues,
Collection<String> prevColumnsToLog)
Writes a subset of tableToLog to the binary log.
|
void |
logTableHandle(TableLoggerBase.Handle logHandle,
Row.Flags flags,
long index,
TableLoggerBase.Operation operation)
Log a row from a table handle
|
void |
logTableHandlePrev(TableLoggerBase.Handle logHandle,
Row.Flags flags,
long index,
TableLoggerBase.Operation operation)
Log a previous row from a table handle
|
static <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.
|
getLogHandle, logTable, logTable, logTable, logTable, logTable, logTable, logTable
void logTableHandle(TableLoggerBase.Handle logHandle, Row.Flags flags, long index, TableLoggerBase.Operation operation) throws IOException
logHandle
- the log handle to extract data fromflags
- controls the transaction behaviorindex
- the row (index key) to logoperation
- the table update event that resulted in this log callIOException
- if the log call failsvoid logTableHandlePrev(TableLoggerBase.Handle logHandle, Row.Flags flags, long index, TableLoggerBase.Operation operation) throws IOException
logHandle
- the log handle to extract data fromflags
- controls the transaction behaviorindex
- the row (index key) to logoperation
- the table update event that resulted in this log callIOException
- if the log call failsdefault void logTable(Table tableToLog, Index index, TableLoggerBase.Flags flags, boolean logUpdates, boolean logPrevValues) throws IOException
logTable
in interface TableLoggerBase
tableToLog
- the table to log, must conform to the definition used to create this loggerindex
- the subset of the table to logflags
- controls the transaction behaviorlogUpdates
- if true, continue to log updates to the tablelogPrevValues
- if true, log the old version of each row when rows are modified (only applicable when logUpdates is true)IOException
- if an error occurs while loggingdefault void logTable(Table tableToLog, Index index, TableLoggerBase.Flags flags, boolean logUpdates, boolean logPrevValues, Collection<String> prevColumnsToLog) throws IOException
logTable
in interface TableLoggerBase
tableToLog
- the table to log, must conform to the definition used to create this loggerindex
- the subset of the table to logflags
- controls the transaction behaviorlogUpdates
- if true, continue to log updates to the tableprevColumnsToLog
- 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)IOException
- if an error occurs while loggingdefault TableWriter getWriter()
static <T> ColumnSource maybeWrapWithNoPrevSource(Collection<String> prevColumnsToLog, String columnName, ColumnSource<T> columnSource)
T
- the column typeprevColumnsToLog
- collection of columns for which to log previous values (null for all)columnName
- name of the relevant columncolumnSource
- ColumnSource corresponding to the given column name