public class JdbcLogger extends Object implements TableLoggerBase, AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
JdbcLogger.Builder |
TableLoggerBase.Flags, TableLoggerBase.Handle, TableLoggerBase.Operation
DEFAULT_TABLELOGGER_FLAGS
Modifier and Type | Method and Description |
---|---|
static JdbcLogger.Builder |
builder(com.fishlib.io.logger.Logger logger,
String jdbcDriver,
String jdbcUrl,
String tableName) |
static JdbcLogger.Builder |
builder(com.fishlib.io.logger.Logger logger,
String jdbcDriver,
String jdbcUrl,
String schema,
String tableName) |
static JdbcLogger.Builder |
builder(com.fishlib.io.logger.Logger logger,
String jdbcDriver,
String jdbcUrl,
String catalog,
String schema,
String tableName) |
void |
close() |
TableLoggerBase.Handle |
getLogHandle(Table tableToLog)
Gets a handle suitable for use with logTableHandle.
|
void |
logTable(Table tableToLog,
Index index,
TableLoggerBase.Flags flags,
boolean logUpdates,
boolean logPrevValues)
Log the contents of the given table to the JDBC.
|
void |
stopLoggingUpdates()
If we are presently logging updates, stop and remove the listener from the source table.
|
public void close()
close
in interface AutoCloseable
public TableLoggerBase.Handle getLogHandle(Table tableToLog)
TableLoggerBase
getLogHandle
in interface TableLoggerBase
tableToLog
- the table to log, must conform to the definition used to create this loggerpublic void logTable(Table tableToLog, Index index, TableLoggerBase.Flags flags, boolean logUpdates, boolean logPrevValues)
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)public void stopLoggingUpdates()
public static JdbcLogger.Builder builder(com.fishlib.io.logger.Logger logger, String jdbcDriver, String jdbcUrl, String catalog, String schema, String tableName)
public static JdbcLogger.Builder builder(com.fishlib.io.logger.Logger logger, String jdbcDriver, String jdbcUrl, String schema, String tableName)
public static JdbcLogger.Builder builder(com.fishlib.io.logger.Logger logger, String jdbcDriver, String jdbcUrl, String tableName)