/// <summary>
        /// see IPartitionHandler#Handle .
        /// </summary>
        /// <param name="stepSplitter"></param>
        /// <param name="masterStepExecution"></param>
        /// <returns></returns>
        /// <exception cref="Exception">&nbsp;</exception>
        public ICollection <StepExecution> Handle(IStepExecutionSplitter stepSplitter, StepExecution masterStepExecution)
        {
            HashSet <StepExecution> stepExecutions = stepSplitter.Split(masterStepExecution, _gridSize);

            if (masterStepExecution.ExecutionContext.ContainsKey("batch.restart"))
            {
                foreach (StepExecution stepExecution in stepExecutions)
                {
                    stepExecution.ExecutionContext.Put("batch.restart", true);
                }
            }
            return(DoHandle(masterStepExecution, stepExecutions));
        }
        /// <summary>
        /// see IPartitionHandler#Handle .
        /// </summary>
        /// <param name="stepSplitter"></param>
        /// <param name="masterStepExecution"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public ICollection <StepExecution> Handle(IStepExecutionSplitter stepSplitter, StepExecution masterStepExecution)
        {
            HashSet <StepExecution> stepExecutions = stepSplitter.Split(masterStepExecution, _gridSize);

            return(DoHandle(masterStepExecution, stepExecutions));
        }
 /// <summary>
 /// see IPartitionHandler#Handle .
 /// </summary>
 /// <param name="stepSplitter"></param>
 /// <param name="masterStepExecution"></param>
 /// <returns></returns>
 /// <exception cref="Exception"></exception>
 public ICollection<StepExecution> Handle(IStepExecutionSplitter stepSplitter, StepExecution masterStepExecution)
 {
     HashSet<StepExecution> stepExecutions = stepSplitter.Split(masterStepExecution, _gridSize);
     return DoHandle(masterStepExecution, stepExecutions);
 }
 /// <summary>
 /// Sets the splitter.
 /// </summary>
 /// <param name="splitter">the splitter</param>
 /// <returns>the current step builder</returns>
 public PartitionStepBuilder Splitter(IStepExecutionSplitter splitter)
 {
     _splitter = splitter;
     return(this);
 }
 /// <summary>
 /// Sets the splitter.
 /// </summary>
 /// <param name="splitter">the splitter</param>
 /// <returns>the current step builder</returns>
 public PartitionStepBuilder Splitter(IStepExecutionSplitter splitter)
 {
     _splitter = splitter;
     return this;
 }