@ Override public void deleteStepThreadInstanceOfRelatedPartitions ( TopLevelStepInstanceKey stepInstanceKey ) { long compareInstanceId = stepInstanceKey . getJobInstance ( ) ; for ( StepThreadInstanceEntity stepThreadInstance : data . stepThreadInstanceData . values ( ) ) { if ( ( stepThreadInstance . getJobInstance ( ) . getInstanceId ( ) == compareInstanceId ) && ( stepThreadInstance . getStepName ( ) . equals ( stepInstanceKey . getStepName ( ) ) ) && ( ! ( stepThreadInstance instanceof TopLevelStepInstanceEntity ) ) ) { StepThreadInstanceKey removalKey = new StepThreadInstanceKey ( stepThreadInstance ) ; data . stepThreadInstanceData . remove ( removalKey ) ; } } }
It might seems like this should delete related partition - level step executions as well .