protected List<WorkUnit> getPreviousWorkUnitsForRetry(SourceState state) {
    List<WorkUnit> workUnits = Lists.newArrayList();
    for (WorkUnitState workUnitState : getPreviousWorkUnitStatesForRetry(state)) {
      // Make a copy here as getWorkUnit() below returns an ImmutableWorkUnit
      workUnits.add(WorkUnit.copyOf(workUnitState.getWorkunit()));
    }

    return workUnits;
  }
protected List < WorkUnit > getPreviousWorkUnitsForRetry ( SourceState state ) { List < WorkUnit > workUnits = Lists . newArrayList ( ) ; for ( WorkUnitState workUnitState : getPreviousWorkUnitStatesForRetry ( state ) ) { workUnits . add ( WorkUnit . copyOf ( workUnitState . getWorkunit ( ) ) ) ; } return workUnits ; }
Get a list of previous {@link WorkUnit}s subject for retries.

<p>
This method uses {@link AbstractSource#getPreviousWorkUnitStatesForRetry(SourceState)}.
</p>

@param state Source state
@return list of previous {@link WorkUnit}s subject for retries