public void updateLastCommitSeqno(ReplDBMSHeader header,long appliedLatency) throws ReplicatorException {
  try {
    if (lowSeqno == Long.MIN_VALUE) {
      ReplDBMSHeader lowHeader=lastCommitSeqno();
      if (lowHeader == null)       lowSeqno=-1;
 else       lowSeqno=lowHeader.getSeqno();
      if (logger.isDebugEnabled())       logger.debug("Fetching low seqno for task: " + lowSeqno);
    }
    if (header.getSeqno() >= lowSeqno) {
      if (logger.isDebugEnabled())       logger.debug("Updating last committed event header: " + header.getSeqno());
      commitSeqnoUpdate.setLong(1,header.getSeqno());
      commitSeqnoUpdate.setShort(2,header.getFragno());
      commitSeqnoUpdate.setBoolean(3,header.getLastFrag());
      commitSeqnoUpdate.setString(4,header.getSourceId());
      commitSeqnoUpdate.setLong(5,header.getEpochNumber());
      commitSeqnoUpdate.setString(6,header.getEventId());
      commitSeqnoUpdate.setLong(7,Math.max(appliedLatency,0));
      commitSeqnoUpdate.setTimestamp(8,new Timestamp(System.currentTimeMillis()));
      commitSeqnoUpdate.setString(9,header.getShardId());
      commitSeqnoUpdate.setTimestamp(10,header.getExtractedTstamp());
      commitSeqnoUpdate.setInt(11,taskId);
      commitSeqnoUpdate.executeUpdate();
    }
 else {
      if (lowSeqnoWarning) {
        if (logger.isDebugEnabled())         logger.debug("Skipping update of last committed event header: seqno=" + header.getSeqno() + " lowSeqno="+ lowSeqno);
      }
 else {
        logger.warn("Skipping attempted update of last committed event header to avoid resetting restart point: seqno=" + header.getSeqno() + " lowSeqno="+ lowSeqno);
        lowSeqnoWarning=true;
      }
    }
  }
 catch (  SQLException e) {
    throw new ReplicatorException("Unable to update last commit seqno: " + e.getMessage(),e);
  }
}

public void updateLastCommitSeqno ( ReplDBMSHeader header , long appliedLatency ) throws ReplicatorException { try { if ( lowSeqno == Long . MIN_VALUE ) { ReplDBMSHeader lowHeader = lastCommitSeqno ( ) ; if ( lowHeader == null ) lowSeqno = - 1 ; else lowSeqno = lowHeader . getSeqno ( ) ; if ( logger . isDebugEnabled ( ) ) logger . debug ( "Fetching low seqno for task: " + lowSeqno ) ; } if ( header . getSeqno ( ) >= lowSeqno ) { if ( logger . isDebugEnabled ( ) ) logger . debug ( "Updating last committed event header: " + header . getSeqno ( ) ) ; commitSeqnoUpdate . setLong ( 1 , header . getSeqno ( ) ) ; commitSeqnoUpdate . setShort ( 2 , header . getFragno ( ) ) ; commitSeqnoUpdate . setBoolean ( 3 , header . getLastFrag ( ) ) ; commitSeqnoUpdate . setString ( 4 , header . getSourceId ( ) ) ; commitSeqnoUpdate . setLong ( 5 , header . getEpochNumber ( ) ) ; commitSeqnoUpdate . setString ( 6 , header . getEventId ( ) ) ; commitSeqnoUpdate . setLong ( 7 , Math . max ( appliedLatency , 0 ) ) ; commitSeqnoUpdate . setTimestamp ( 8 , new Timestamp ( System . currentTimeMillis ( ) ) ) ; commitSeqnoUpdate . setString ( 9 , header . getShardId ( ) ) ; commitSeqnoUpdate . setTimestamp ( 10 , header . getExtractedTstamp ( ) ) ; commitSeqnoUpdate . setInt ( 11 , taskId ) ; commitSeqnoUpdate . executeUpdate ( ) ; } else { if ( lowSeqnoWarning ) { if ( logger . isDebugEnabled ( ) ) logger . debug ( "Skipping update of last committed event header: seqno=" + header . getSeqno ( ) + " lowSeqno=" + lowSeqno ) ; } else { logger . warn ( "Skipping attempted update of last committed event header to avoid resetting restart point: seqno=" + header . getSeqno ( ) + " lowSeqno=" + lowSeqno ) ; lowSeqnoWarning = true ; } } } catch ( SQLException e ) { throw new ReplicatorException ( "Unable to update last commit seqno: " + e . getMessage ( ) , e ) ; } }
updates the last committed seqno for a single channel . this is a client call used by appliers to mark the restart position .
