public class SimpleJournalHandler extends java.lang.Object implements JournalHandler
| Constructor and Description |
|---|
SimpleJournalHandler(java.lang.String journalTable,
java.lang.String query,
int batchSize,
Publisher publisher,
JournalStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBatchSize() |
java.lang.String |
getJournalTable() |
JournalStrategy |
getStrategy()
Establish the journal strategy:
DELETE - removes imported rows from journal table
WINDOW - memorizes
|
java.lang.String |
getTargetQuery()
The query to retrieve changed data can references columns from journal
table as named parameters:
|
void |
publish(Data data)
Publishes captured data (like writing a file or publishing to a kafka
queue).
|
public SimpleJournalHandler(java.lang.String journalTable,
java.lang.String query,
int batchSize,
Publisher publisher,
JournalStrategy strategy)
throws ConfigurationException
journalTable - journal table's namequery - query for data retrievalbatchSize - number of rows per batchpublisher - Publisher objectstrategy - journal strategyConfigurationException - invalid parameterspublic java.lang.String getJournalTable()
getJournalTable in interface JournalHandlerpublic int getBatchSize()
getBatchSize in interface JournalHandlerpublic java.lang.String getTargetQuery()
JournalHandlerThe query to retrieve changed data can references columns from journal table as named parameters:
select * from mytable where pk = :pkgetTargetQuery in interface JournalHandlerpublic void publish(Data data) throws PublishException
JournalHandlerpublish in interface JournalHandlerdata - retrieved data (see Data})PublishException - failed to publish retrieved datapublic JournalStrategy getStrategy()
JournalHandlergetStrategy in interface JournalHandler