com.ibm.di.server
Interface CheckpointRestartInterface

All Known Implementing Classes:
ADChangelogConnector, ADChangelogConnectorv2, DBChangelogConnector, DominoChangeDetectionConnector, DSMLParser, ExchangeChangelogConnector, FileConnector, HTTPClientConnector, IBMMQConnector, IDSChangelogConnector, JMSConnector, NetscapeChangelogConnector, OldHTTPCLient, SNMPConnector, SOAPParser, TCPConnector, XMLParser, XSLbasedXMLParser, ZOSChangelogConnector

public interface CheckpointRestartInterface

This interface is implemented by connectors, parsers and eventhandlers that support checkpoint/restart.


Field Summary
static int RESTART_AFTER
           
static int RESTART_BEFORE
           
static int RESTART_IN
           
 
Method Summary
 Entry getCheckpointInformation()
          Returns the state information for 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.
 

Field Detail

RESTART_BEFORE

static final int RESTART_BEFORE
See Also:
Constant Field Values

RESTART_IN

static final int RESTART_IN
See Also:
Constant Field Values

RESTART_AFTER

static final int RESTART_AFTER
See Also:
Constant Field Values
Method Detail

isCheckpointRestartEnabled

boolean isCheckpointRestartEnabled(int mode)
Components that support checkpoint/restart for a specific mode must return TRUE from this method. If a restart has no meaning for mode then the connector should still return TRUE.

Parameters:
mode - The mode the connector runs in
Returns:
true if checkpoint is supported in mode
See Also:
ServerConstants

getCheckpointInformation

Entry getCheckpointInformation()
                               throws Exception
Returns the state information for the connector. If for some reason the connector decidies that a restart is impossible it must throw an exception. The method is called immediatly before any component methods are called. If there is no need to save any state information a null value should be returned. For eventhandlers this method is called by the dispatcher routine.

Returns:
The entry the connector needs to do a restart or null if that is not needed.
Throws:
Exception

prepareForRestart

void prepareForRestart(ALState state,
                       Entry restartInfo,
                       int restartPoint)
                       throws Exception
Notifies the connector of a restart situation. This method is called after the connector has been loaded and before any other method calls are made to the connector. If the connector decides it cannot restart it must throw an exception.

Parameters:
restartInfo - The last entry object returned by the connector in the getCheckpointInformation method
state - The ALState object for the AssemblyLine
restartPoint - The relative point where restarting is taking place (e.g. RESTART_BEFORE ...)
Throws:
Exception