public class SimpleDBTagHistoryWriter extends java.lang.Object implements DataHandler
Constructor and Description |
---|
SimpleDBTagHistoryWriter(ConnectionProvider<? extends java.sql.Connection> connProvider,
java.lang.String targetTable,
boolean writeValType)
Initializes the writer.
|
SimpleDBTagHistoryWriter(ConnectionProvider<? extends java.sql.Connection> connProvider,
java.lang.String targetTable,
boolean writeValType,
java.lang.String dbQuoteChar) |
Modifier and Type | Method and Description |
---|---|
void |
flush()
Indicate that the handler won't get any more data, at least for a while.
|
protected org.apache.log4j.Logger |
getLogger() |
void |
putValue(RawTagValue inValue)
Insert a value into the handler.
|
protected void |
runBatch(java.util.List<RawTagValue> values) |
void |
setCommitTimeout(int ms)
Sets how frequently commits will be made.
|
public SimpleDBTagHistoryWriter(ConnectionProvider<? extends java.sql.Connection> connProvider, java.lang.String targetTable, boolean writeValType)
connProvider
- targetTable
- writeValType
- if TRUE, the value type column will be written as well (for optimized tables). Raw tables will use
FALSE.public SimpleDBTagHistoryWriter(ConnectionProvider<? extends java.sql.Connection> connProvider, java.lang.String targetTable, boolean writeValType, java.lang.String dbQuoteChar)
public void setCommitTimeout(int ms)
ms
- protected org.apache.log4j.Logger getLogger()
public void putValue(RawTagValue inValue) throws java.lang.Exception
DataHandler
putValue
in interface DataHandler
java.lang.Exception
protected void runBatch(java.util.List<RawTagValue> values) throws java.lang.Exception
java.lang.Exception
public void flush() throws java.lang.Exception
DataHandler
flush
in interface DataHandler
java.lang.Exception