|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.JDBCConnector
com.ibm.di.connector.DBChangelogConnector
public class DBChangelogConnector
The DBChangelogConnector provides a way to to detect changes in specific RDBMS tables. The Connector connects to the underline database through JDBC driver and creates Entries from specific "change table" containing one record per modified record in the target table. The Connector regularly saves current state into the System Store to avoid duplications when retrieving Entries. Records can also be deleted after the retrieving.
| Field Summary |
|---|
| Fields inherited from class com.ibm.di.connector.Connector |
|---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
| Fields inherited from interface com.ibm.di.server.CheckpointRestartInterface |
|---|
RESTART_AFTER, RESTART_BEFORE, RESTART_IN |
| Fields inherited from interface com.ibm.di.connector.ChangelogInterface |
|---|
CONN_PARAM_STATE_KEY_PERSISTENCE, PARAM_VAL_AFTER_READ, PARAM_VAL_END_OF_CYCLE, PARAM_VAL_MANUAL, SAVE_STATE_AFTER_READ, SAVE_STATE_END_OF_CYCLE, SAVE_STATE_MANUAL |
| Constructor Summary | |
|---|---|
DBChangelogConnector()
Constructor for the DBChangelogConnector object |
|
| Method Summary | |
|---|---|
String |
ctString(Object ct)
Converts the Object to String |
boolean |
doWait()
Waits n seconds specified in the pollInterval parameter |
Entry |
getCheckpointInformation()
Returns the state information for the connector. |
Entry |
getNextEntry()
Gets the next Entry object from the "change table". |
Object |
getStateKeyObject()
Gets the current changeToken object. |
int |
getStateKeySaveMethod()
Returns the method used to store the current changelog number |
String |
getVersion()
Return version information |
void |
initialize(Object o)
Reads Connector parameter's values and initialize the Connector. |
boolean |
isCheckpointRestartEnabled(int mode)
Components that support checkpoint/restart for a specific mode must return TRUE from this method. |
void |
prepareForRestart(ALState state,
Entry restartInfo,
int restartPoint)
Notifies the connector of a restart situation. |
void |
removeProcessedRows()
Removes Processed rows from the "change table" |
void |
reselect()
Retrieves records from "change table" |
void |
saveStateKey()
Saves the State Key in the System Store |
void |
selectEntries()
Prepares the Connector for sequential read. |
String |
toHex(int n)
Converts int to Hex String |
| Methods inherited from class com.ibm.di.connector.JDBCConnector |
|---|
alterSession, commit, deleteEntry, execSQL, execSQLSelect, findEntry, getConnection, getNextSQLSelectEntry, getStatement, getSubClause, getWhereClause, isDeltaSupported, isIOException, modEntry, putEntry, querySchema, queryTables, rollback, saveMetaData, setCommitMode, setCurrent, setResultSet, setSessionParameters, sqlValue, terminate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
|---|
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer |
| Constructor Detail |
|---|
public DBChangelogConnector()
| Method Detail |
|---|
public void initialize(Object o)
throws Exception
initialize in interface ConnectorInterfaceinitialize in class JDBCConnectoro - Null, Socket or ConnectorMode class
Exception - If invalid Connector parameter values are supplied.
public void selectEntries()
throws Exception
selectEntries in interface ConnectorInterfaceselectEntries in class JDBCConnectorException - If an error occurs while selecting EntriesJDBCConnector.getNextEntry()
public void reselect()
throws Exception
Exception - If an error occurs while retriving records from
database
public void removeProcessedRows()
throws Exception
Exception - If the Connector can not delete processed rows in the
databasepublic String ctString(Object ct)
ct - the Object need to be converted
public String toHex(int n)
n - int need to be converted to Hex String
public Entry getNextEntry()
throws Exception
getNextEntry in interface ConnectorInterfacegetNextEntry in class JDBCConnectorException - If retrieving the next Entry fails.Connector.selectEntries()
public boolean doWait()
throws Exception
Exception - if an error occurs during sleeping.
public int getStateKeySaveMethod()
throws Exception
getStateKeySaveMethod in interface ChangelogInterfaceException - if an error occurs.ChangelogInterface
public void saveStateKey()
throws Exception
saveStateKey in interface ChangelogInterfaceException - if an error occurs.ChangelogInterface
public Object getStateKeyObject()
throws Exception
getStateKeyObject in interface ChangelogInterfaceException - if an error occurs.ChangelogInterfacepublic String getVersion()
getVersion in interface VersionInfoInterfacegetVersion in class JDBCConnectorpublic boolean isCheckpointRestartEnabled(int mode)
isCheckpointRestartEnabled in interface CheckpointRestartInterfacemode - The mode the connector runs in
ServerConstants
public Entry getCheckpointInformation()
throws Exception
getCheckpointInformation in interface CheckpointRestartInterfaceException
public void prepareForRestart(ALState state,
Entry restartInfo,
int restartPoint)
throws Exception
prepareForRestart in interface CheckpointRestartInterfacestate - The ALState object for the AssemblyLinerestartInfo - The last entry object returned by the connector in the
getCheckpointInformation methodrestartPoint - The relative point where restarting is taking place
(e.g. RESTART_BEFORE ...)
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||