private ActionCallback restore(final int index) {
        final ActionCallback result = new ActionCallback();
        final Restore action = myActions.get(index);
        final ActionCallback actionCalback = action.restoreInGrid();
        actionCalback.doWhenDone(
            () -> {
              if (index < myActions.size() - 1) {
                restore(index + 1).notifyWhenDone(result);
              } else {
                result.setDone();
              }
            });

        return result;
      }
示例#2
0
 public void restore() throws FriendlyBackupException, InterruptedException {
   restore.doRestore();
 }