com.ibm.di.server
Class CSDeltaTaskComponent

java.lang.Object
  extended by com.ibm.di.server.AssemblyLineComponent
      extended by com.ibm.di.server.CSDeltaTaskComponent

public class CSDeltaTaskComponent
extends AssemblyLineComponent


Field Summary
 
Fields inherited from class com.ibm.di.server.AssemblyLineComponent
addmap, CHECKPOINT_GETS, config, connConfig, connector, connPool, handler, imap, INITIALIZE, log, modmap, name, parent, pooledConnector, restartCycle, reusingConnector, SELECT, stats
 
Constructor Summary
CSDeltaTaskComponent(AssemblyLine parent, String name, ConnectorConfig config, ConnectorInterface conn, boolean isRestarting)
           
CSDeltaTaskComponent(AssemblyLine parent, String name, ConnectorConfig config, ConnectorInterface conn, boolean isRestarting, boolean forceRuntime)
           
 
Method Summary
 void commitDeltaState()
          Commit the last transactions in CloudScape database
 void commitOnEndIter()
          Commit if in commit mode "On end of AL cycle"
static boolean deltaEnabled(ConnectorConfig config)
           
 void doConnectorTerminate()
          This method calls the appropriate hooks and the connector's terminate method.
 Entry getnext()
          The method returns the next entry from the connector.
 Entry getnext(Entry work)
          The method returns the next entry from the connector.
 Entry getRestartInfoEntry()
          This method returns the connector's restart info entry.
 boolean markEntryInDeltaStore(Entry work)
          Marks an Entry in the Delta Store.
 Entry nextDeletedEntry(Entry work)
          Return the next deleted entry
 void rollbackDeltaState()
          Rollback the last transactions in CloudScape database
 void saveDeltaState()
          Commit the last transactions in CloudScape database (alias for commitDeltaState)
 void setRestartInfoEntry(ALState state, Entry rsi, int restartPoint)
           
 
Methods inherited from class com.ibm.di.server.AssemblyLineComponent
add, callreply, checkInitialize, checkTerminate, close, debug, delete, deleteEntry, delta, doConnectorInitialize, dumpEntry, dumpObjects, expandParameters, getBaseConfiguration, getConfig, getConfiguration, getConnector, getConnectorParam, getCriteria, getCurrent, getDebug, getDuplicateEntryCount, getFirstDuplicateEntry, getHandler, getLastEntry, getLastReadEntry, getLog, getName, getnextClient, getNextDuplicateEntry, getStats, getType, handleException, handleSuccess, initialize, isCheckpointRestartEnabled, isDeltaMode, isEnabled, isExceptionFatal, logmsg, lookup, lookup, mapEntry, modify, pushback, reconnect, reply, setConnectorParam, setCriteria, setCriteria, setCurrent, setDebug, setDuplicateEntryCount, setErrorObject, setName, trigger, trigger, trigger, update, verifySchema, wasConfigurationModified, willExecute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSDeltaTaskComponent

public CSDeltaTaskComponent(AssemblyLine parent,
                            String name,
                            ConnectorConfig config,
                            ConnectorInterface conn,
                            boolean isRestarting)
                     throws Exception
Throws:
Exception

CSDeltaTaskComponent

public CSDeltaTaskComponent(AssemblyLine parent,
                            String name,
                            ConnectorConfig config,
                            ConnectorInterface conn,
                            boolean isRestarting,
                            boolean forceRuntime)
                     throws Exception
Throws:
Exception
Method Detail

deltaEnabled

public static boolean deltaEnabled(ConnectorConfig config)

doConnectorTerminate

public void doConnectorTerminate()
                          throws Exception
This method calls the appropriate hooks and the connector's terminate method. The DeltaStore is also closed.

Overrides:
doConnectorTerminate in class AssemblyLineComponent
Throws:
Exception

getnext

public Entry getnext()
              throws Exception
Description copied from class: AssemblyLineComponent
The method returns the next entry from the connector.

Overrides:
getnext in class AssemblyLineComponent
Returns:
The next input entry or null if there are no more entries
Throws:
Exception - Errors that may occur

getnext

public Entry getnext(Entry work)
              throws Exception
Description copied from class: AssemblyLineComponent
The method returns the next entry from the connector. It is called by the AssemblyLine if we are working in Iterator mode.

Overrides:
getnext in class AssemblyLineComponent
Parameters:
work - The work entry to fill in
Returns:
The work entry filled with the next input entry, or null if there are no more entries
Throws:
Exception - Errors that may occur

nextDeletedEntry

public Entry nextDeletedEntry(Entry work)
                       throws Exception
Return the next deleted entry

Throws:
Exception

getRestartInfoEntry

public Entry getRestartInfoEntry()
                          throws Exception
This method returns the connector's restart info entry.

Overrides:
getRestartInfoEntry in class AssemblyLineComponent
Throws:
Exception

setRestartInfoEntry

public void setRestartInfoEntry(ALState state,
                                Entry rsi,
                                int restartPoint)
                         throws Exception
Overrides:
setRestartInfoEntry in class AssemblyLineComponent
Throws:
Exception

commitDeltaState

public void commitDeltaState()
                      throws SQLException
Commit the last transactions in CloudScape database

Throws:
SQLException - Thrown if an error occurs

rollbackDeltaState

public void rollbackDeltaState()
                        throws SQLException
Rollback the last transactions in CloudScape database

Throws:
SQLException - Thrown if an error occurs
See Also:
markEntryInDeltaStore( Entry )

saveDeltaState

public void saveDeltaState()
                    throws SQLException
Commit the last transactions in CloudScape database (alias for commitDeltaState)

Throws:
SQLException - Thrown if an error occurs

commitOnEndIter

public void commitOnEndIter()
                     throws SQLException
Commit if in commit mode "On end of AL cycle"

Throws:
SQLException - Thrown if an error occurs

markEntryInDeltaStore

public boolean markEntryInDeltaStore(Entry work)
Marks an Entry in the Delta Store. This can be useful if the current change can not be propagated properly, and you want to roll back the delta state. You can then use code like this, assuming this Component is called MyIterator:
 MyIterator.rollbackDeltaState();
 MyIterator.markEntryInDeltaStore(work);
 MyIterator.commitDeltaState();
 

Parameters:
work - The Entry that contains the key information
Returns:
true if the Entry contained a meaningful key and could be marked in the delta store