Example #1
0
 protected boolean doStoreCheckpoint(
     DispatcherState curState, DbusEvent nextEvent, Checkpoint cp, SCN endWinScn)
     throws SharedCheckpointException {
   // drain all the callbacks ; if there are errors; then return false; prepare to rollback
   boolean success = processDataEventsBatch(curState);
   if (!success) {
     _log.error(
         "Consumers did not process callback successfully (callback did not return success). The current checkpoint= "
             + nextEvent.isCheckpointMessage()
             + " end of period marker="
             + nextEvent.isEndOfPeriodMarker());
   } else {
     try {
       // try to store checkpoint; if this doesn't succeed then still return true
       storeCheckpoint(curState, cp, endWinScn);
     } catch (IOException e) {
       _log.error("Checkpoint persisting failed, the checkpoint is : " + cp);
       if (isSharedCheckpoint()) {
         handleErrStoringSharedCheckpoint();
         throw new SharedCheckpointException(e);
       }
     }
   }
   return success;
 }
 public void dumpEventValue(DbusEvent event, DbusEventDecoder eventDecoder) {
   if (!event.isEndOfPeriodMarker()) {
     eventDecoder.dumpEventValueInJSON(event, _writeChannel);
   }
 }