Package com.ibm.di.connector
Class DominoChangeDetectionConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- com.ibm.di.connector.DominoChangeDetectionConnector
-
- All Implemented Interfaces:
ChangelogInterface
,ConnectorInterface
,VersionInfoInterface
,java.lang.Runnable
,java.util.Comparator
public class DominoChangeDetectionConnector extends Connector implements ConnectorInterface, ChangelogInterface, java.lang.Runnable, java.util.Comparator
This connector is used for receiving change notification from a Domino server and feeding the AL with the applied on the server changes.
-
-
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.connector.ChangelogInterface
CONN_PARAM_STATE_KEY_PERSISTENCE, PARAM_MERGE_BOTH_NOT_MERGED, PARAM_MERGE_CHANGELOG_AND_DATA, PARAM_MERGE_ONLY_CHANGED_DATA, 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
Constructors Constructor Description DominoChangeDetectionConnector()
Connector's public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.Object arg0, java.lang.Object arg1)
Compares two documents by the dates they are modifiedEntry
getNextEntry()
Retrieves the next changed entry.java.lang.Object
getStateKeyObject()
Retrieves synchronization state.int
getStateKeySaveMethod()
Retrieves the method for storing StateKey.java.lang.String
getVersion()
Version information.void
initialize(java.lang.Object aObj)
Reads Connector parameters and initializes the local and IIOP Notes sessions.void
run()
Executes Notes commands until termination is requestedvoid
saveStateKey()
Stores the USN values for the next synchronization.void
selectEntries()
Reads and sets the start synchronization state.void
skipCurrentDocument()
Skip the current document.void
terminate()
Terminates the local and IIOP Notes sessions.-
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, extractExceptionInformation, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextClient, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logError, logmsg, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, querySchema, queryTables, reconnect, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface, terminateServer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
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, terminateServer
-
-
-
-
Method Detail
-
run
public void run()
Executes Notes commands until termination is requested- Specified by:
run
in interfacejava.lang.Runnable
-
skipCurrentDocument
public void skipCurrentDocument() throws java.lang.Exception
Skip the current document. Use this method to skip problem documents when the Connector will otherwise die with an exception.For example use the following script in the "Default On Error" hook of the Connector:
thisConnector.connector.skipCurrentDocument();
- Throws:
java.lang.Exception
- If the Notes thread is not running or the Notes thread encounters an error while processing the command.
-
initialize
public void initialize(java.lang.Object aObj) throws java.lang.Exception
Reads Connector parameters and initializes the local and IIOP Notes sessions. Opens the specified database in both local and IIOP session.- Specified by:
initialize
in interfaceConnectorInterface
- Overrides:
initialize
in classConnector
- Parameters:
aObj
- Object.- Throws:
java.lang.Exception
- if an error occurs.
-
selectEntries
public void selectEntries() throws java.lang.Exception
Reads and sets the start synchronization state.- Specified by:
selectEntries
in interfaceConnectorInterface
- Overrides:
selectEntries
in classConnector
- Throws:
java.lang.Exception
- if an error occurs
-
getNextEntry
public Entry getNextEntry() throws java.lang.Exception
Retrieves the next changed entry.- Specified by:
getNextEntry
in interfaceConnectorInterface
- Overrides:
getNextEntry
in classConnector
- Returns:
- next Entry
- Throws:
java.lang.Exception
- if an error occurs- See Also:
ConnectorInterface.selectEntries()
-
terminate
public void terminate()
Terminates the local and IIOP Notes sessions.- Specified by:
terminate
in interfaceConnectorInterface
- Overrides:
terminate
in classConnector
-
compare
public int compare(java.lang.Object arg0, java.lang.Object arg1)
Compares two documents by the dates they are modified- Specified by:
compare
in interfacejava.util.Comparator
- Parameters:
arg0
- the unID of the first documentarg1
- the unID of the second document- Returns:
-1
if the first document was modified before the second;1
if the first document was modified afrer the second;0
if the time of modification was the same
-
getVersion
public java.lang.String getVersion()
Version information.- Specified by:
getVersion
in interfaceVersionInfoInterface
- Returns:
- the version of the Connector.
-
getStateKeySaveMethod
public int getStateKeySaveMethod() throws java.lang.Exception
Retrieves the method for storing StateKey.- Specified by:
getStateKeySaveMethod
in interfaceChangelogInterface
- Returns:
- the identifier of the method used for storing the StateKey in the TDI Store.
- Throws:
java.lang.Exception
- - never- See Also:
ChangelogInterface.SAVE_STATE_AFTER_READ
,ChangelogInterface.SAVE_STATE_END_OF_CYCLE
,ChangelogInterface.SAVE_STATE_MANUAL
-
saveStateKey
public void saveStateKey() throws java.lang.Exception
Stores the USN values for the next synchronization. This method will skip the storing of the StateKey if the StateKey save method is set toChangelogInterface.SAVE_STATE_AFTER_READ
- Specified by:
saveStateKey
in interfaceChangelogInterface
- Throws:
java.lang.Exception
- - never
-
getStateKeyObject
public java.lang.Object getStateKeyObject() throws java.lang.Exception
Retrieves synchronization state.- Specified by:
getStateKeyObject
in interfaceChangelogInterface
- Returns:
- the synchronization state into an Entry object.
- Throws:
java.lang.Exception
- if an error occurs.
-
-