private void apply(ReplDBMSEvent event,boolean doCommit,boolean doRollback,boolean syncTHL) throws ReplicatorException, ConsistencyException, InterruptedException {
  try {
    taskProgress.beginApplyInterval();
    applier.apply(event,doCommit,doRollback,syncTHL);
    if (doCommit) {
      schedule.commit();
      blockEventCount=0;
      lastCommitMillis=System.currentTimeMillis();
    }
  }
 catch (  ApplierException e) {
    if (context.getApplierFailurePolicy() == FailurePolicy.STOP) {
      throw e;
    }
 else {
      String message="Event application failed: seqno=" + event.getSeqno() + " fragno="+ event.getFragno()+ " message="+ e.getMessage();
      logError(message,e);
    }
  }
 finally {
    taskProgress.endApplyInterval();
  }
}

private void apply ( ReplDBMSEvent event , boolean doCommit , boolean doRollback , boolean syncTHL ) throws ReplicatorException , ConsistencyException , InterruptedException { try { taskProgress . beginApplyInterval ( ) ; applier . apply ( event , doCommit , doRollback , syncTHL ) ; if ( doCommit ) { schedule . commit ( ) ; blockEventCount = 0 ; lastCommitMillis = System . currentTimeMillis ( ) ; } } catch ( ApplierException e ) { if ( context . getApplierFailurePolicy ( ) == FailurePolicy . STOP ) { throw e ; } else { String message = "Event application failed: seqno=" + event . getSeqno ( ) + " fragno=" + event . getFragno ( ) + " message=" + e . getMessage ( ) ; logError ( message , e ) ; } } finally { taskProgress . endApplyInterval ( ) ; } }
utility routine to wrap apply operation with standard exception handling and event accounting .
