code: protected void checkExistingRestore(SnapshotIdentifier snapshotIdentifier) {
          Iterator<String> currentSpaces = snapshotProvider.getSpaces();
          while (currentSpaces.hasNext()) {
              String spaceId = currentSpaces.next();
              if (spaceId.equals(snapshotIdentifier.getRestoreSpaceId())) {
                  // This snapshot has already been restored
                  String error = "A request to restore snapshot with ID " +
                                 snapshotIdentifier.getSnapshotId() +
                                 " has been made previously. The snapshot is " +
                                 "being restored to space: " + spaceId;
                  throw new TaskException(error);
              }
          }
      }
docs: /*
  Determines if a restore of this snapshot is either already under way
  or complete. This determination is based on the existance of a space
  which matches the restore spaceId of the snapshot.
  
  Note: If the original spaceId used to take the snapshot was long
  (and especially if multiple snapshots were taken on a single day), it
  is possible for a name conflict to occur if multiple snapshots of the
  same space are restored at the same time.