/** * Checks to see if there is a check point. If so, and the checkpoint phaseId does not equal, * NO_PHASE_ID, call the necessary opertions to move to the current checkpoint. * * @param splitter the splitter to see if it implments the interface CheckpointHandler. * @param checkpoint the checkpoint object associated with the given feed file. * @return true if a move to check point was initiated. */ private Boolean performCheckpoint(Splitter splitter, FeedCheckpoint checkpoint) { // Move to checkpoint if splitter is instance of checkpoint if (splitter instanceof Checkpointable) { // Determine if a checkpoint has been created. if (checkpoint != null && !checkpoint.getPhaseId().equals(CheckpointHelper.NO_PHASE_ID)) { if (checkpointService != null) checkpointService.beforeCheckpoint(); ((Checkpointable) splitter).moveToCheckpoint(checkpoint); if (checkpointService != null) checkpointService.afterCheckpoint(); return true; } } return false; }
/** Iterates and executes the list of batchEventPhases. */ private void doBatchEventPhases() { // Must be called after initialization and before anything else. detailSplitter.prePhaseExecute(); // Get checkpoint from context after checkpoint phase.initialize(). if (checkpointService != null) { traversDetailWithCheckpoint(checkpointService.getCheckpoint()); } else { traversDetailWithOutCheckpoint(); } }